Programmer's Guide > Interfaces > ADocument interface > undoBoundary method
  
undoBoundary method
This method inserts a boundary in the undo history so that a subsequent undo will restore changes up to the current state. Normally, the editor inserts a boundary automatically before changes are made by a menu item, toolbar selection, or keyboard shortcut. When implementing a custom application dialog, it may be necessary to call the undoBoundary method before making document changes using the AOM, especially if the dialog is modeless and allows multiple changes to be made which should be undone individually.
The undoBoundary method enables undo history on this document. Normally, a document not associated with a window will not have undo history enabled.
The optional description parameter may be specified to set the label for the Undo menu. Application code can access this label by calling the eval method on the Acl interface. For example, in JavaScript:
var lbl = Acl.eval("main::undo_label");
undoBoundary( [description] )
Parameters
Stringdescription
[optional] Specifies the description to use as the Undo menu label for the next undoable change to the document.
Returns
void