Results 1 to 1 of 1
December 17th, 2010, 12:27 PM #12,703Seņor Member
The DependendDispatcher (custom class needing a few thoughts)
I have already created a class named the DependentDispatcher, the description of which can be found in the "Source/Experiments" section of the forum in order to keep this post as uncluttered as possible:
I have another thought on it's functionality which I'm not sure how to handle.
If someone tries to "dispatchEvent" directly onto the DependentDispatcher, what should it do? Which of these options makes the most sense?
(A) Do not allow the DependentDispatcher to dispatch any events.Or should the class be set up to allow multiple "modes" of how dispatched events are handled and allow you to decide on which logic to use at initialization time?
(B) Run all handlers registered to the DependentDispatcher for that dispatched event.
(C) Relay the event to the Event to the attached "target" (if any exists) and dispatch it from there, letting the event bubble and run through all listeners on the target.