grimmwerks
|
 |
« Reply #1 on: March 10, 2011, 11:32:33 » |
|
Ok #1 is easier than I thought.
In my constants file I just have a new message of ALERT_SIMPLE (thinking I couldn't do the closehandler at first).
The main app mediator responds as such:
public function respondToAlertSimple(note:INotification):void{ var n:Object = note.getBody(); mx.controls.Alert.show(n.text, n.title, n.flags, this.application, n.closeHandler, n.iconClass, n.defaultButtonFlag); }
That way any module can just send the notification
public function reactToButtonCancelDay$Click(ev:Event):void{ //routeNotification(MixConstants.ORDER_CANCEL_DAY, null, null, "*"); routeNotification(MixConstants.ALERT_SIMPLE, {text: "test", title:"first", closeHandler: this.returnAlert}); } public function returnAlert(ev:Event):void{ routeNotification(MixConstants.ALERT_SIMPLE, {text: "YEH got it", title:"response" }); }
But more importantly I need to know how to pop open a module....
|