UNDOABLE Object
- Last UpdatedMar 24, 2023
- 1 minute read
The UNDOABLE object allows you to add functionality to the undo and redo stacks.
Methods
|
Name |
Result |
Purpose |
|---|---|---|
|
description(STRING) |
NO RESULT |
Adds description text to the undoable. |
|
add() |
NO RESULT |
Marks the database with the description text and adds this undoable to the undo stack. |
|
endundoable() |
NO RESULT |
Marks the database again at the end of the change. |
|
undoAction (STRING) |
NO RESULT |
Specify a command to be executed when this undoable is taken off the undo stack. |
|
redoAction(STRING) |
NO RESULT |
Specify a command to execute when this undoable is taken off the redo stack. |
|
clearAction(STRING) |
NO RESULT |
Specify a command to execute when this undoable is cleared without any associated undo/redo being performed. |
Command
To use this object, first create an undoable object, and define the undoAction(), redoAction() and clearAction() methods to define the execution strings.
Call the method add() to mark the database and add the undoable object to the undo stack.
Make the set of changes that you may wish to undo, then call the method endundoable() to mark the end of the changes.