PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: marks416 on October 28, 2008, 11:49:55



Title: why notification called twice?
Post by: marks416 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?

Thanks

Mark


Title: Re: why notification called twice?
Post by: puremvc 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,
-=Cliff>


Title: Re: why notification called twice?
Post by: rdewolff 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.