After having read the Flex and Flash documentation on Menu and
MenuBar, my already low opinion of these animals and their
documentation has declined further.
Like others, I am unable to get (for example)
menu.setMenuItemEnabled("myInstanceName", false);
to work.
Is this access-via-instanceName simply broken?
How do I get the "index number" of a nested menu / submenu item?
TIA.
--- In [email protected], "extensive_systems"
<[EMAIL PROTECTED]> wrote:
>
> Perhaps I'm missing something obvious...
>
> Given a MenuBar defined by this XML:
>
> <menuitem>
> <menuitem label="A">
> <menuitem label="AA">
> <menuitem label="AA1" instanceName="inAA1"/>
> </menuitem>
> </menuitem>
> </menuitem>
>
> How can I zero in and operate on an arbitrary menu item (like that
> with instanceName "inAA1"), e.g., to enable or disable it?
>
> And is the 'instanceName' attribute useful for anything other than
> discrimination in a switch statement in a menu's event handler?