Disabling MenuItems
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Thu Dec 8 11:03:23 EST 2005
Salut Rob,
It's the reason why I told you that I prefer to use a menu template
stored into a custom property *without* any "(" , "!c", etc.
Then I put the custom property into a variable and don't worry about
the current status of any menu item :-)
None item, using this way, can be *already* disabled: I always use a
*fresh* menu and rebuild it at each call.
It's very fast to disable, put a checkmark and so on (I have some pop-
up with until 5 rows and hundreds of menu items that need 300 lines
of code to be built from the template: they appear instantaneously :-)
This way of doing eliminates all kind of error and makes completely
safe your menus handling.
Just try it!
Le 8 déc. 05 à 16:47, Rob Cozens a écrit :
>> put "(" before line lineOffset("Paste", tMenu) of tMenu
>> Very fast an reliable.
>
> What if the item is already disabled? That's why my logic checks
> the char before adding a "(" on disable or blindly deleting char 1
> to enable.
Best Regards from Paris,
Eric Chatonet
------------------------------------------------------------------------
----------------------
http://www.sosmartsoftware.com/ eric.chatonet at sosmartsoftware.com/
More information about the use-livecode
mailing list