You could have a CommandCollection object that contains a collection of
Commands. The protocol you have to conform to is #forwardTo: and
#queryCommand:. So, you could simply forwardsthe #queryCommand: message
to each Command inside of your collection. The same goes for the
#forwardTo:. For example:
forwardTo: aReceiver
self commandCollection do: [:eachCommand | eachCommand forwardTo:
aReceiver]
Or you could have a LinkedCommand that has instance variable for the
next Command. And you could do the same as above. Just keep the same
protocol.
I recently blogged on the Command framework in Dolphin:
http://www.blainebuxton.com/weblog/2005/09/dolphins-command-framework.htmlhttp://www.blainebuxton.com/weblog/2005/09/re-dolphins-command-framework.htmlLet me know if this helps. Feel free to email me.
--
Blaine Buxton, Mad Scientist In Training
"You're as beautiful as your thoughts"-EW&F
http://www.blainebuxton.comGünther Schmidt wrote:
> Hi,
>
> is there a way to 'nest' Commands/CommandDescriptions into each other,
> to somehow chain them?
>
> Günther