First, does the sub menu exist when you are trying to access it?  I don't
think they're created until they are needed.  Otherwise, it looks the like
the best way is to get access to the item renderer which has a menu
property, although i'm not 100% sure that it's the correct menu that you are
looking for. We'll see.

- Daniel Freiman

On Mon, Jun 2, 2008 at 10:53 AM, Marty Pitt <[EMAIL PROTECTED]> wrote:

>   Hi Tracy
>
> Thanks for the reply.
>
> I'm not trying to access the XML of the data provider for the Menu, rather
> generated Menu instance itself.
>
> I can access the Menu instance of the top level object (the "file" menu),
> but not the sub-menu's beneath, also of type Menu.
>
> Anyone have any ideas?
>
>
> ----- Original Message ----
> From: Tracy Spratt <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Monday, June 2, 2008 3:44:14 PM
> Subject: RE: [flexcoders] Accessing the sub-items of a Menu command
>
>   var xmlMenuItem: XML = xml..menuItem. (attribute("label") == "Do
> Something")[0];
>
> Tracy
>  ------------------------------
>
> *From:* [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ]
> *On Behalf Of *Marty Pitt
> *Sent:* Monday, June 02, 2008 6:11 AM
> *To:* [EMAIL PROTECTED] ups.com
> *Subject:* [flexcoders] Accessing the sub-items of a Menu command
>
>
>
> Hi all.
>
> This is a stupid question, but I can't work it out!
>
> Given the following XML and code, how am I supposed to access the "Do
> Something" menu item that is created?
>
> var xml:XML = new XML(
> <root>
>      <menuItem label="File">
>            <menuItem label="Do Something" />
>       </menuItem>
> </root>
> );
>
> var menuBar:MenuBar = new MenuBar();
> menuBar.dataProvide r = xml;
> menuBar.showRoot = false;
> menuBar.labelField = "@label"
>
>
>
> By making a call to menuBar.getMenuAt( 0) I get a reference to the "File"
> menu, returned as type Menu.
>
> Menu doesn't seem to expose either a collection of sub-items, or a
> getMenuAt() method.
>
> I'm stumped!
>
> Any help greatly appreciated.
>
> Cheers
>
> Marty
>
>
>
>
>  
>

Reply via email to