[Flex 2.0.143459]
I build a simple MenuBar example from the doc.
then I clicked on the menubar to activate it.
then I moved the mouse quickly to Open and close the menus
(may be in a circular way, I don't know for instance...)
after a few seconds, I have the following error:
RangeError: Error #2006: L'index indiqué sort des limites.
at flash.display::DisplayObjectContainer/addChildAt()
at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()[C:\dev\GMC\sdk\frameworks\mx\managers\SystemManager.as:1578]
at
mx.managers::SystemManager/addChild()[C:\dev\GMC\sdk\frameworks\mx\managers\SystemManager.as:1190]
at
mx.managers::PopUpManager$/addPopUp()[C:\dev\GMC\sdk\frameworks\mx\managers\PopUpManager.as:221]
at
mx.controls::Menu/show()[C:\dev\GMC\sdk\frameworks\mx\controls\Menu.as:1027]
at
mx.controls::MenuBar/mx.controls:MenuBar::showMenu()[C:\dev\GMC\sdk\frameworks\mx\controls\MenuBar.as:1350]
at
mx.controls::MenuBar/mx.controls:MenuBar::mouseOverHandler()[C:\dev\GMC\sdk\frameworks\mx\controls\MenuBar.as:1431]
what's wrong ?
Here the code:
<?xml version="1.0"?>
<!-- Simple example to demonstrate the MenuBar control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initCollections();" >
<mx:Script>
<![CDATA[
import mx.events.MenuEvent;
import mx.controls.Alert;
import mx.collections.*;
[Bindable]
public var menuBarCollection:XMLListCollection;
private var menubarXML:XMLList =
<>
<menuitem label="Menu1">
<menuitem label="MenuItem 1-A" data="1A"/>
<menuitem label="MenuItem 1-B" data="1B"/>
</menuitem>
<menuitem label="Menu2">
<menuitem label="MenuItem 2-A" type="check"
data="2A"/>
<menuitem type="separator" />
<menuitem label="MenuItem 2-B" >
<menuitem label="SubMenuItem 3-A" type="radio"
groupName="one" data="3A"/>
<menuitem label="SubMenuItem 3-B" type="radio"
groupName="one" data="3B"/>
</menuitem>
</menuitem>
</>;
// Event handler for the MenuBar control's itemClick event.
private function menuHandler(event:MenuEvent):void {
Alert.show("Label: " + [EMAIL PROTECTED] + "\n" +
"Data: " + [EMAIL PROTECTED], "Clicked menu item");
}
// Event handler to initialize the MenuBar control.
private function initCollections():void {
menuBarCollection = new XMLListCollection(menubarXML);
}
]]>
</mx:Script>
<mx:Panel title="MenuBar Control Example" height="75%" width="75%"
paddingTop="10" paddingLeft="10">
<mx:Label width="100%" color="blue"
text="Select a menu item."/>
<mx:MenuBar labelField="@label" itemClick="menuHandler(event);"
dataProvider="{menuBarCollection}" />
</mx:Panel>
</mx:Application>
--
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> 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/