[ https://issues.apache.org/jira/browse/FLEX-19964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Mclean updated FLEX-19964: --------------------------------- Labels: easytest (was: ) > Event type 'mx.events:Event' is unavailable. Cannot define custom event > handler in MXML. > ---------------------------------------------------------------------------------------- > > Key: FLEX-19964 > URL: https://issues.apache.org/jira/browse/FLEX-19964 > Project: Apache Flex > Issue Type: Bug > Components: MXML Compiler > Affects Versions: Adobe Flex SDK 3.2 (Release) > Environment: Affected OS(s): All OS Platforms > Affected OS(s): All OS Platforms > Language Found: English > Reporter: Adobe JIRA > Labels: easytest > > Steps to reproduce: > 1. Compile the following MXML 3.2 SDK (or see bug.mxml): > <?xml version="1.0" encoding="utf-8"?> > <mx:Application > xmlns:mx="http://www.adobe.com/2006/mxml" > xmlns:controls="controls.*" > layout="absolute" > > <mx:Script> > <![CDATA[ > import mx.controls.Alert; > ]] > > > </mx:Script> > <controls:CustomPanel > id="myCustomPanel" > title="Panel Title" > buttonLabel="Button Label" > buttonIcon="@Embed(source='assets/inner.PNG')" > titleBtnPressed="Alert.show('Button has been pressed!')" > width="300" > height="200" /> > </mx:Application> > 2. Chaos. > Actual Results: > Compiler error: > ""Event type 'mx.events:Event' is unavailable."" > Expected Results: > No compiler error. > Workaround (if any): > Add the custom event handler using ActionScript: > <?xml version="1.0" encoding="utf-8"?> > <mx:Application > xmlns:mx="http://www.adobe.com/2006/mxml" > xmlns:controls="controls.*" > layout="absolute" > > <mx:Script> > <![CDATA[ > import mx.controls.Alert; > > private function init() : void { > > myCustomPanel.addEventListener("titleBtnPressed", handleEvent); > } > > private function handleEvent(evt:Event) : void { > Alert.show('Button has been pressed!'); > } > ]] > > > </mx:Script> > <controls:CustomPanel > id="myCustomPanel" > title="Panel Title" > buttonLabel="Button Label" > buttonIcon="@Embed(source='assets/inner.PNG')" > creationComplete="init()" > width="300" > height="200" /> > </mx:Application> > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira