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

Pages: [1]
Print
Author Topic: Routed notification received many times  (Read 1719 times)
dancantong
Jr. Member
**
Posts: 12


View Profile Email
« on: November 20, 2009, 06:46:27 »

Hi!

I have routed a notification from a module to another one and the module that receives the notification is receving it four times instead of one as expected.
I don't know if I'm doing something wrong.

The code is:

In mediator code of the Module that sends the notification:

routeNotification(UserAdminModule.NTF_SHOW_USERS_LIST, null, null, "*");

In mediator code of the Module that receives the notification:

override public function listNotificationInterests():Array
{
 return [UserAdminModule.NTF_SHOW_USERS_LIST];
   
}

override public function handleNotification(notification:INotification):void {

 switch(notification.getName()) {
  case UserAdminModule.NTF_SHOW_USERS_LIST:
   userAdmin.setNavigationView(UserAdmin.VS_INDEX_USERS_LIST);
   mediatorsForUsersList();
   break;
 
  default:
   trace("[WARN]: Notification not handled: " + notification.getName());
 }
   
}

Can anyone help me?
Thanks
Logged
Pages: [1]
Print