Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not show an option
Message
 
 
To
23/06/2012 07:09:58
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01546561
Message ID:
01546718
Views:
51
>>>>>>Hello again, GentleFolk
>>>>>>
>>>>>>I seem to remember that if you put something (like "Not IsSupervisor") in the "Skip For" option of the Menu Designer it would not show that option if you weren't a supervisor. Am I mis-remembering or is this something that got changed in VFP8? The Option is showing, but disabled and I'd like it not to show at all
>>>>>
>>>>>Use GenMenuX to remove options you don't want.
>>>>>
>>>>>http://www.aksel.com/genmenux/default.htm
>>>>>
>>>>>Tamar
>>>>
>>>>Unfortunately I can't use any 3rd party add-ons, not without a 2-4 year approval process.
>>>
>>>Dorris,
>>>
>>>There's nothing against using a function() in the SKIP FOR
>>>
>>>The function can add/remove bars to/from the popup.
>>>
>>>Remember to return true/false
>>
>>You could also perform the add/remove of menu items within the Cleanup section of the menu. The downside is that the menu is "static" once launched (i.e. when you "log on" to the application). To effect a menu change requires that you re-launch the MPR file. Using a function in the SKIP FOR clause is more flexible as it does allow for dynamically adding/removing items each time the menu is activated -- however it might incur a slight cost (the SKIP FOR will be evaluated for each bar on a popup whenever the popup is activated). Likely the cost will be small enough to be unnoticible. In the worst case the delay could manifest itself as a fraction of a second delay between clicking on a menu bar and the dropdown appearing.
>
>
>Never used MPR files
>
>> (the SKIP FOR will be evaluated for each bar on a popup whenever the popup is activated).
>
>I think the 'skip for' is evaluated for all the popups when you click on the menu bar. They are not re-evaluated when any popup is activated
>
>> Likely the cost will be small enough to be unnoticible
>
>Yes, you want the function to exit as soon as possible
>
>I have a menu with a pad Text on it. It shows the contents of a folder and also makes popups for each subfolder - it builds recursively (using one skip for) and is pretty fast
>Each item has a picture ( folder, pdf, word, excel, etc) . The pictures are the small icons that are extracted from the corresponding exe's. The trick is to cache those icons so that the icon for say excel is only extracted the first time it is needed.

(boldfacing mine)

Eric Lippert had a fascinating article in the October 2011 issue of MSDN Magazine about different approaches to speeding up performance. His starting point was "Imagine what the world would be like if people worked the same way as computer programs" -- sequentially, with the next step unable to start until the previous step ends. The main topic is the new Async features in VS 2012. It's worth a read.

http://msdn.microsoft.com/en-us/magazine/hh456401.aspx
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform