MenuBars aren't working properly in my pop-ups, whereas they are
working just fine in my Main.mxml.

In my pop-up, the File menu I've declared won't even drop down when I
click on it.

---------------------------------------------------------------------

In Main.mxml:

<mx:MenuBar id="MainMenuBar" width="450"
change="menuChangeHandler(event)">
<mx:dataProvider>
<mx:XML>
<menuitem label="Finder">
  <menuitem label="Finder A" type="Finder" data="FinderA"/>
  <menuitem label="Finder B" type="Finder" data="FinderB"/>
</menuitem>
<menuitem label="Add/Edit">
  <menuitem label="Add/Edit A" type="Add/Edit" data="AddEditA"/>
  <menuitem label="Add/Edit B" type="Add/Edit" data="AddEditB"/>
</menuitem>
</mx:XML>
</mx:dataProvider>
</mx:MenuBar>

<mx:Script><![CDATA[
private function menuChangeHandler(event){
if(event.menuItem.attributes.data == "FinderA") {
commonViewHelper.openWindow('FinderA')                          
} else if(event.menuItem.attributes.data == "FinderB") {
commonViewHelper.openWindow('FinderB')
} else if(event.menuItem.attributes.data == "AddEditA") {               
commonViewHelper.openWindow('AddEditA')
} else if(event.menuItem.attributes.data == "AddEditB") {
commonViewHelper.openWindow('AddEditB')
}
]]></mx:Script>

(That works fine)

---------------------------------------------------------------------

In PopUp.mxml:

<mx:MenuBar id="PopUpMenuBar" width="450"
change="menuChangeHandler(event)">
<mx:dataProvider>
<mx:XML>
<menuitem label="File">
  <menuitem label="Open" type="File" data="Open"/>
  <menuitem label="Close" type="File" data="Close"/>
  <menuitem label="Save" type="File" data="Save"/>
</menuitem>
</mx:XML>
</mx:dataProvider>
</mx:MenuBar>

private function menuChangeHandler(event){
if(event.menuItem.attributes.data == "Open") {
  // Nothing yet
} else if(event.menuItem.attributes.data == "Close") {
  PopUpViewHelper.closePopUp(); // Closes the pop-up            
} else if(event.menuItem.attributes.data == "Save") {
  // Nothing yet
}
}

(This is not working properly - the menu won't even drop down to show
the options.)

Any insight would be greatly appreciated.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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/
 


Reply via email to