Ok, here's another question about the new Cairngorm 2 release:

In the org.nevis.cairngorm.control.FrontController I used to add
commands by using 

addCommand( commandName : String, commandRef : Command ).


This enabled me to use the addCommand method more than once with the
same SequenceCommand subclass. 

For example:

addCommand(MY_EVENT_1, new MySequenceCommand(new CairngormEventA());
addCommand(MY_EVENT_2, new MySequenceCommand(new CairngormEventB());


In terms of code reusability this was very helpful.

Surprisingly the constructor of the
com.adobe.cairngorm.commands.SequenceCommand doesn't seem to have
changed compared to its predecessor, but the
com.adobe.cairngorm.control.FrontController has changed a lot.

The addCommand method does not accept a command instance as a
parameter - it only works with Class references:

addCommand( commandName : String, commandRef : Class )

Why has it been changed to a Class reference?
How can I add (and ideally reuse) a SequenceCommand to the
FrontController now? To me it looks like I have to write seperate
SequenceCommands instead of reusing one for multiple purposes.
Or am I wrong here?

Cheers
David






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to