Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 4.5 adobe builder/flex eventhandler/skinablepopupcontainer returned data empty
- protected function button1_clickHandler(event:MouseEvent):void
- {
- // Create an instance of MyAlertPopUp.
- var alertDB:AlertMsgPurge = new AlertMsgPurge();
- // Add an event handler for the close event to check for
- // any returned data.
- alertDB.addEventListener('close', alertDB_closeHandler);
- alertDB.open(this, true);
- }
- private function alertDB_closeHandler(eventP:PopUpEvent):void {
- // If commit is false, do data is returned.
- rd.text = eventP.data as String;
- //return;
- /
- }
- <?xml version="1.0" encoding="utf-8"?>
- <s:SkinnablePopUpContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx">
- <fx:Script>
- <![CDATA[
- // //
- public function onClick(commit:Boolean):void {
- close(true);
- }
- ]]>
- </fx:Script>
- <s:TitleWindow title="" x="75" y="300">
- <s:VGroup horizontalAlign="center" paddingTop="8" paddingBottom="8" paddingLeft="8" paddingRight="8" gap="5" width="100%">
- <s:Label text="Warning!! all data will be deleted"/>
- <s:Button label="Yes" click="close(true);"/>
- <s:Button label="No" click="close(false);"/>
- </s:VGroup>
- </s:TitleWindow>
- private function alertDB_closeHandler(eventP:PopUpEvent):void {
- trace("eventdata:"+eventP.commit);
- }
Advertisement
Add Comment
Please, Sign In to add comment