PureMVC Framework for haXe: API Documentation
Back | Index
class org.puremvc.haxe.utilities.undo.controller.UndoableCommandBase
extends org.puremvc.haxe.patterns.command.SimpleCommand
implements org.puremvc.haxe.utilities.undo.interfaces.IUndoableCommand
The base class for any undoable command. Any other classes that needs to be undo/redo enabled must extend it.
function new() : Void
function executeCommand() : Void
This method must be overriden in the super class. Place here the code for the command to execute.
function getCommandName() : String

Returns a display name for the undoable command.

By default, the name of the command is the name of the notification. // of the class. You must override this method whenever you want to set a different name.

function getNote() : org.puremvc.haxe.interfaces.INotification
Returns the notification sent to this command
function redo() : Void
Calls executeCommand
function registerUndoCommand(cmdClass : Class<org.puremvc.haxe.interfaces.ICommand>) : Void
Registers the undo command
function setNote(value : org.puremvc.haxe.interfaces.INotification) : Void
Sets the value for the nore
function undo() : Void

Calls the undo command setting its note type to UndoableCommandTypeEnum.NON_RECORDABLE_COMMAND so that it won't get recorded into the history since it is already in the history.

The type of the notification is used as a flag, indicating wheather to save the command into the history, or not. The undo command, should not be recorded into the history, and its notification type is set to UndoableCommandEnum.NON_RECORDABLE_COMMAND

Back | Index