CommandManager.removeCommand Member
Removes a single command.
Syntax
object.removeCommand(command);
Arguments
Argument | Summary |
---|---|
command | The CommandRecord to remove from the CommandManager. Ideally use the value returned from defineCommand. |
Returns
Remarks
See Also
Source Code
function cmgr_remove(command)
{
delete this.commands[command.name];
if (objectContains(this.commandHistory, command.name))
{
/* There was a previous command with this name - restore the most
* recent from the history, returning the command to its former glory.
*/
this.commands[command.name] = this.commandHistory[command.name].pop();
if (this.commandHistory[command.name].length == 0)
delete this.commandHistory[command.name];
}
}