Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / Architecture / sendNotification between module and main app (multicore) on: July 20, 2008, 02:30:45
I'm trying out multicore for the first time, and I'm relatively new to PureMVC.

I set up my code so that I have a main app and a module (both in the same project). 

Q. How can I send a notification from my module to the main app?  It seems like the ApplicationFacade classes handle the notification, but since I have two ApplicationFacades, how do I handle communication between them (without tightly coupling my module and my main app).

In the module I have a ViewMediator that calls (note: this applicationFacade is the main one):

:
  protected function showStatus( event:Event ):void
  {
    statusNav.appNavShell.setStatusMessage(StatusNav.SHOW_STATUS_MESSAGE); // works
    sendNotification(ApplicationFacade.VIEW_STATUS); // doesn't work.
  }

In the main app, I have another ViewMediator listening for this:

:
  override public function listNotificationInterests():Array
  {
     return [ ApplicationFacade.VIEW_STATUS
              ];
  }


Thanks,
KL
Pages: [1]