AddActionToHistory
TheAddActionToHistorymethod pushes the action data and its associated part onto the undo stack.
void AddActionToHistory (in ODPart whichPart, in ODActionData actionData, in ODActionType actionType, in ODName undoActionLabel, in ODName redoActionLabel);
whichPart- A reference to the part that performed the action.
actionData- A byte array whose buffer contains the data needed by the part to allow it to undo the action.
actionType- The possible type of undo action. The value of
actionTypemust be one of the following:kODSingleAction,kODBeginAction, orkODEndAction.undoActionLabel- A user-visible label for the undo command beginning with the word Undo.
redoActionLabel- A user-visible label for the redo command beginning with the word Redo.
DISCUSSION
The valuekODSingleActionfor theactionTypeparameter indicates that the action was a single action. The valuekODBeginActionindicates that the action was the first action of a multistep action. The valuekODEndActionindicates that the action was the last action of a multistep action.EXCEPTIONS
kODErrCannotAddAction- Cannot add the specified action to this undo object; an undo or redo action is already in progress.
kODErrOutOfMemory- There is not enough memory to allocate the action information.
SEE ALSO
TheODActionDatatype (page 898).
TheODActionTypetype (page 898).
TheODNametype (page 876).
"Adding an Action to the Undo Action History" on page 259 in OpenDoc Programmer's Guide.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help