Packagecom.bourre.commands
Interfacepublic interface MacroCommand extends Command
ImplementorsASyncBatch, Batch

Player version: Flash Player 9.0
Language version: ActionScript 3.0

A macro command wraps many commands execution in a single execute call. The MacroCommand doesn't guarantee the order of commands to be executed, except if a concret implementation provide a guarantee over the order of commands.

Some implementations can choose to allow more than one instance of the same command in its commands list. In that case the macro command should follow the rules defines by the Collection interface about duplicate entries.

Some implementation can stretch the execution of its sub-commands outside of the execute call, in that case the concret implementation had better tom also implements the ASyncCommand interface to provide a feedback for its execution end.

See also

../collection/Collection.html


Public Methods
 MethodDefined by
  
addCommand(command:Command):Boolean
Adds the passed-in command to this macro command.
MacroCommand
 Inherited
execute(e:Event = null):void
Execute the request according to the current command data.
Command
  
removeCommand(command:Command):Boolean
Removes the passed-in command from this macro command.
MacroCommand
Method detail
addCommand()method
public function addCommand(command:Command):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds the passed-in command to this macro command.

Parameters
command:Command — command to add in this macro command

Returns
Booleantrue if the command have been succesfully added. The addCommand ensure that the command exist in the macro command at the end of the call
removeCommand()method 
public function removeCommand(command:Command):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Removes the passed-in command from this macro command.

Parameters
command:Command — command to remove from this macro command

Returns
Booleantrue if the command have been succesfully removed