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: Send Notification Queue ?  (Read 3126 times)
trifox
Newbie
*
Posts: 2


View Profile Email
« on: November 18, 2009, 10:03:07 »

hello,

i just wanted to let you know, that i use a modified "ApplicationFacade" always in my projects

the change i made has to do with the "sendNotification" functionality of the facade, i had often
the cases, that notifications were send BEFORE another notification has received all its receivers ...

so, i had to supress dispatching of new notifications while a notification is under work ...

this modification has been used in nearly all projects, and if i started a project without this
mod, after a few weeks errors occured because of that problem ...

in my opinion it would be good to define the sending of notifications somehow, either with a flag, or another base class for applicationfacade ...

just wanted to let ya know, i will continue using it

cheers
ck
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: November 18, 2009, 11:16:31 »

You don't necessarily want to suppress the sending of notifications that occur before a given notification has made its rounds.

If you are having problems with this sort of thing, I would suggest
a) More time spent planning your notification traffic, and
b) Looking into the StateMachine utility, which allows you to define discrete application states, such that the key notifications are sent out on state change. Only certain ACTION notifications can trigger state change, and you can ensure that all of your work in the given state is complete before sending out those notes.

-=Cliff>
Logged
Pages: [1]
Print