Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
August 22, 2017, 03:20:13 PM
Home Help Search Login Register
News: Please DM @puremvc on Twitter to gain forum access. Spambots are why we can't have nice things.
Pages: [1]
Print
Author Topic: Fabrication, Modules and Popups oh my...  (Read 5784 times)
grimmwerks
Jr. Member
**
Posts: 14


View Profile Email
« on: March 10, 2011, 11:11:36 AM »

I've got an app that uses Fabrication and loads in a few modules using the FlexModuleLoader...

I've a two part question:

1) how best to control regular alerts / popups from one of the modules so that it displays at the top most level (ie through notification to the main application via message body)

2) how to take a module that is loaded in and display that as a popup  -- again probably partially through #1 but unsure how to make a module display as part of PopupManager?

I've read Simon's  / newtriks posts both here and on his own site and I don't think it's going to work the same way I need to work...

Greatly appreciate any assistance as I'm not sure how best to deal with multi modules as popups...
Logged
grimmwerks
Jr. Member
**
Posts: 14


View Profile Email
« Reply #1 on: March 10, 2011, 11:32:33 AM »

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....
Logged
Pages: [1]
Print
Jump to: