valdhor, Thank you for your help. Using your code, I was able to make my menubar function properly as well.
You should take a look at Tracy's method, its much cleaner and works great! All you have to do is: var resultXML:XML = new XML(evt.result.valueOf()); mainAppMenuBar.dataProvider = resultXML.menuitem; Thanks! -David --- In [email protected], "valdhor" <[EMAIL PROTECTED]> wrote: > > In my menubar I don't have the <menuitems></menuitems> so my XML would be: > > <menuitem label="Retail" data="top"> > <menuitem label="Current Year Reservation" data=""/> > <menuitem label="Next Year Reservations" data=""/> > </menuitem> > <menuitem label="Charter" data="top"> > <menuitem label="Charter Contact Information" data=""/> > </menuitem> > <menuitem label="Utilities" data="top"> > <menuitem label="Time Management" data="load: empTime"/> > </menuitem> > > My variables are setup like this: > > [Bindable] public var menuBarCollection:XMLListCollection; > private var menubarXML:XMLList; > > My ResultEvent handler looks like this: > > menubarXML = XMLList(String(event.result)); > menuBarCollection = new XMLListCollection(menubarXML); > > And my menubar is created like so: > > <mx:MenuBar labelField="@label" itemClick="menuHandler(event);" > dataProvider="{menuBarCollection}" /> > > > I don't know if this is the "right" way or not but it works for me. > > > > --- In [email protected], "David C. Moody" <davidm@> wrote: > > > > Here's the XML the script returns: > > > > <menuitems> > > <menuitem label="Retail" data="top"> > > <menuitem label="Current Year Reservation" data=""/> > > <menuitem label="Next Year Reservations" data=""/> > > </menuitem> > > <menuitem label="Charter" data="top"> > > <menuitem label="Charter Contact Information" data=""/> > > </menuitem> > > <menuitem label="Utilities" data="top"> > > <menuitem label="Time Management" data="load: empTime"/> > > </menuitem> > > </menuitems> > > > > This is what I have in my function to assign the dataprovider: > > > > var resultXML:XML = new XML(evt.result); > > Alert.show(resultXML.toString()); > > mainAppMenuBar.dataProvider = resultXML.menuitems.menuitem; > > > > But all I get with this is a blank menubar, I've also tried: > > resultXML.menuitems > > > > And that still gave me just a blank menubar. > > > > Thanks for the help! > > -David > > > > > > > > --- In [email protected], "David C. Moody" <davidm@> > > wrote: > > > > > > OK guys, > > > > > > in my example I'm returning XML to set as the dataProvider for my > > > menuBar > > > > > > Example of what's being returned: > > > <root><menuitem label="Retail" data="top"><menuitem label="Current > > > Year Reservation" data="" /><menuitem label="Next Year > > Reservations" > > > data="" /></menuitem></root> > > > > > > But when I set this string as the dataprovider, the button on the > > > menubar is what you see above, then it actually has the menu items > > > when you click on the button. > > > > > > Not exactly what I wanted, so I figured, OK lets take off the > > <root> > > > tags. When I do this I get this error: > > > > > > TypeError: Error #1088: The markup in the document following the > > root > > > element must be well-formed. > > > > > > > > > So I could possibly be headed on a track that will work, but need a > > > little help. > > > > > > Or a completely different idea. > > > > > > Thanks, > > > -David > > > > > > --- In [email protected], "David C. Moody" <davidm@> > > > wrote: > > > > > > > > Hi guys, > > > > > > > > I'm developing a pretty large multi-user application. I need a > > > good > > > > menu system for and was looking for some help, maybe someone has > > > come > > > > up with something they'd like to share or at least has some ideas. > > > > > > > > The general menu will be the same for everyone. But some users > > > will > > > > have access to certain features while others will not. > > > > > > > > I'm thinking of using a menuBar. But this isn't necessary, I'm > > > just > > > > trying to come up with the best way to accomplish this. > > > > > > > > What i was thinking now is have 2 databases: > > > > > > > > Menu & UserMenu > > > > > > > > Menu would hold all menu options, and then UserMenu would hold > > > access > > > > rights to each menu? > > > > > > > > But the only way I can think of doing this is: > > > > Loop through menu and then for each menu item, check Usermenu for > > > > access rights. > > > > > > > > Can anyone else think of a better way to do this? Or maybe have > > a > > > > menu they'd like to share? > > > > > > > > Thanks, > > > > -David > > > > > > > > > >

