Checking the disabled of a menu item
Graham Samuel
graham.samuel at blueyonder.co.uk
Tue Mar 15 19:14:07 EST 2005
In the course of an attempt to find the best way to detect whether a
menu item is disabled or not, I have been putting lines like:
On Tue, 15 Mar 2005 14:03:55 -0500, "Frank D. Engel, Jr."
<fde101 at fjrhome.net> wrote:
> put (line 1 of button "File" of group "Main_Menu" of cd "Store" of
> stack "Main_Display" contains "[") into theDisabledStatus
>
> On Mar 15, 2005, at 1:55 PM, Graham Samuel wrote:
> [...]
>> Anyway how do people generally check the disabled status of menu
>> items?
Thanks for the quick answer Frank - I think I see what you mean: if I
I look at char 1 of this line, it is actually an open bracket if and
only if the menu item is disabled, so I could record it like this:
put (char 1 of line 1 of button "File" of group "Main_Menu" of cd
"Store" of stack "Main_Display" = "(") into myDisabledFlag
I don't understand why I get the wrong answer when I use 'menuItem'
instead of 'line', and 'menu' instead of 'button', but I will look into
that separately.
Graham
------------------------------------------------------------------------
---
Graham Samuel / The Living Fossil Co. / UK and France
More information about the use-livecode
mailing list