I see what you mean Jeff. There used to be a getMenuItemAt() function (myMenu.getMenuAt(0).getMenuItemAt(1).enabled = false), but it looks like it has been depreciated. Sorry for wasting your time. You can always modify the enabled attributes in the dataProvider, after the xml has loaded. Just another thought.
Good luck, Tim --- In flexcoders@yahoogroups.com, "jeff tapper" <[EMAIL PROTECTED]> wrote: > > Sadly, thats where the problems started for me. I'm able to get at > the top level items, using getMenuAt or even using the menuItems > array, but sadly, i cant seem to get a handle on the first child menu > > var myMenu:MenuBar = myMenuBar; > var nextLevel:* = myMenu.getMenuAt(0); > > // throws error Property menuItems not found on mx.controls.Menu > var firstNestedChild:* = nextLevel.menuItems; > > // throws error (Property getMenuAt not found on mx.controls.Menu) > var firstNestedChild:* = nextLevel.getMenuAt(0); > > so, coming back to the original question, what syntax can i use to > get a handle on the nested children MenuBarItems? > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" <TimHoff@> wrote: > > > > Bummer - sorry, > > > > Probably need to look at MenuBar.getMenuAt(index). > > > > -TH > > > > --- In flexcoders@yahoogroups.com, "jeff tapper" <jeff@> wrote: > > > > > > unfortunately not, its populated dynamically at run time. Any > > other > > > ideas on how to address a nested child of the menu? > > > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" <TimHoff@> wrote: > > > > > > > > > > > > Hi Jeff, > > > > > > > > You can handle this with binding. Something like this: > > > > > > > > <menuItem label="File" enabled="{model.FileMenuEnabledFlags > (0)}"> > > > > <menuItem label="New" enabled="{model.FileMenuEnabledFlags > > > (1)}"/> > > > > <menuItem label="Open" > enabled="{model.FileMenuEnabledFlags > > > (2)}"/> > > > > <menuItem label="Save" > enabled="{model.FileMenuEnabledFlags > > > (3)}"/> > > > > </menuItem> > > > > > > > > model.FileMenuEnabledFlags is an array of Boolean values. > > > > > > > > -TH > > > > > > > > --- In flexcoders@yahoogroups.com, "jeff tapper" <jeff@> wrote: > > > > > > > > > > Anyone have a clue how to disable a menu bar item, when it > is > > > not the > > > > > top level? > > > > > > > > > > Given a structure like this: > > > > > <menuItem label="File"> > > > > > <menuItem label="New" /> > > > > > <menuItem label="Open" /> > > > > > <menuItem label="Save" /> > > > > > </menuItem> > > > > > > > > > > I can easily get a handle on the root node ("File"), by > > accessing > > > > > myMenu.menuItems[0], however, i'm banging my head against > the > > > wall > > > > > trying to get a handle on Save as a MenuBarItem, as the File > > item > > > > > doesnt seem to have child items representing the others. > > > > > > > > > > Can someone point me in the right direction here? > > > > > > > > > > Thanks > > > > > > > > > > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/