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: Cannot receive the same notification with multiple mediators  (Read 9291 times)
eugene_se
Newbie
*
Posts: 5


View Profile Email
« on: January 14, 2009, 07:33:25 »

I have two mediators that should receive the same notification. Mediator A always receives the notification. Mediator B only receives the notification if I remove the notification from the function listNotificationInterests() in Mediator A.

Strange thing is that it worked a few hours ago...

What kind of error can I have made?

Thanks,
Eugene
Logged
Jason MacDonald
Sr. Member
****
Posts: 243


View Profile Email
« Reply #1 on: January 14, 2009, 07:36:55 »

Could you post the two mediators? The relevant parts anyway. It's too hard to guess without seeing something.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: January 14, 2009, 07:41:03 »

Try using the debugger. Its an x-ray machine. You can see what's registered and look at the observer lists in the view. Post back if you need help.

-=Cliff>
Logged
eugene_se
Newbie
*
Posts: 5


View Profile Email
« Reply #3 on: January 14, 2009, 08:11:44 »

Hi,

Thanks for your quick response. I found the error, I think. Mediator A always receives the notification before Mediator B. In Mediator A, a runtime error was generated because it tried to access a property of an uninitialized object. By commenting out that part, both Mediators receive the notification.

So I guess that Mediator B did not receive the notification because of a runtime error in Mediator A.

I also tried debugging to see the observer lists in the view, but I don't know where to find these lists.
Logged
Jason MacDonald
Sr. Member
****
Posts: 243


View Profile Email
« Reply #4 on: January 14, 2009, 09:22:43 »


I also tried debugging to see the observer lists in the view, but I don't know where to find these lists.

The Observer map is in facacde.view.observerMap and Mediator Map is in facade.view.mediatorMap.
Logged
Joel Hooks
Courseware Beta
Sr. Member
***
Posts: 146


baby steps

 - 46288188  - passport@provinsal.com  - joeltuff
View Profile WWW Email
« Reply #5 on: January 19, 2009, 10:15:09 »


I also tried debugging to see the observer lists in the view, but I don't know where to find these lists.

The Observer map is in facacde.view.observerMap and Mediator Map is in facade.view.mediatorMap.

After you choose "Show Inaccessible Member Variables"
Logged

http://joelhooks.com - my ramblings about developing with actionscript and python using pureMVC and django respectively.
Pages: [1]
Print