<?xml version=" 1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.Menu;
import mx.controls.Alert;
private var menu: Menu;
private function init(): void
{
var dp: XML = <item1 label="Item1"/>
menu = Menu.createMenu(null, dp);
menu.labelField = "@label";
menu.setStyle("openDuration", 0);
menu.addEventListener("change", onChange);
}
private function onChange(event: Event): void
{
Alert.show("Testing", "title", Alert.YES);
}
]]>
</mx:Script>
<mx:Button x="10" y="10" label="Button" click="menu.show()"/>
</mx:Application>
The problem is that when the menu item is clicked a second time, the alert popup does not appear but the whole screen still goes into a modal state. With no popup to dismiss, you can't get out of the modal state and your app is frozen out. Now, this happens only if the menu's openDuration is set to 0 and you specify some button flags for the alert window (eg. Alert.YES) . I know, sort of obscure, but not an unreasonable scenario (heck, this happened in my app).
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.