CommandManager.addCommand Member
Internal. Use defineCommand.
Syntax
object.addCommand(command);
Arguments
Argument | Summary |
---|---|
command | The CommandRecord to add to the CommandManager. |
Returns
Remarks
See Also
Source Code
function cmgr_add(command)
{
if (objectContains(this.commands, command.name))
{
/* We've already got a command with this name - invoke the history
* storage so that we can undo this back to its original state.
*/
if (!objectContains(this.commandHistory, command.name))
this.commandHistory[command.name] = new Array();
this.commandHistory[command.name].push(this.commands[command.name]);
}
this.commands[command.name] = command;
}