Jimmy wrote:
That's about my implementation - only thing I couldn't read out of the
pseudo code is, that whenever you give back the Dispatch object out of
your container, it still calls upon addStatusListener. So it's possible
that one Dispatch object has multiple StatusListeners, isn't it?
If so I'd have to build up a container that holds the corresponding
Listeners for a specific Dispatch object, right?
Hi Jimmy,
Yes that's the clue. The dispatch object must maintain a container for
all listeners (see first line in DispatchObject::addStatusListener in my
pseudo code).
Carsten Driesner schrieb:
Hi Jimmy,
I am not sure if I understand your current problem. First you should
assure that you provide one dispatch object for a command.
AddStatusListener is called by user every interface elements which is
bound to the command. That means you have no influence when or how
often addStatusListener is called. Therefore a dispatch object must
maintain a container for the listeners which can add themselves via
addStatusListener.
The logical structure (pseudo code!) should look like:
DispatchObject::addStatusListener( XStatusListener xStatusListener )
{
// Add new listener to my listener container
ListenerContainer.add( xStatusListener );
The dispatch object has to add every status listener to its container!
Regards,
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]