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]
Author Topic: why notification called twice?  (Read 8275 times)
Sr. Member
Posts: 52

View Profile Email
« on: October 28, 2008, 11:49:55 »

Hi ,

I have a difficult to use puremvc now.

I just call notification once but I see notification called twice when I trace in handleNotification.

Do you have the error before?


Global Moderator
Hero Member
Posts: 2871

View Profile WWW Email
« Reply #1 on: October 30, 2008, 06:38:30 »

Pretty difficult to say since you don't describe where the Notification came from. Could it be that the actor that sent the note actually sent it twice? Or that the Mediator listed the interest twice and thus was placed on the observer list for that notification twice?

If its not one of the above, I suggest dropping the trace approach and using the debugger. Place a breakpoint on the line where the note is sent and debug the app. When executions stops at your breakpoint, do  'step into' and continue to step through the code until the notification makes its way into the mediator and is handled. Keep stepping and find out what happens.

Hope this helps,
Posts: 2

View Profile Email
« Reply #2 on: November 26, 2008, 11:04:20 »

Have you found out your error?

Maybe you assign an event twice. Lemme explain. Maybe you set up on an UPDATE_COMPLETE (ie) to add an event to your button.

If you load the componend twice, then your event will be double, and thus, called twice.

Might help.
Pages: [1]