IDLitOperation::DoAction
Syntax | Return Value | Arguments | Keywords | Version History
The IDLitOperation::DoAction function method is called when an operation is requested by the iTools system, either as the result of a user action such as selection of a menu item or toolbar button, or by another operation.
Note
Every operation based directly on the IDLitOperation class must implement its own DoAction method. See Creating an Operation (iTool Developer's Guide) for details.
A specific operation class' implementation of this method must create an initialized IDLitCommandSet object, execute the operation, and return the command set object to the caller. DoAction can also call the IDLitOperation::RecordInitialValues and IDLitOperation::RecordFinalValues methods to ensure that the appropriate values are committed to the undo-redo transaction buffer.
If your operation changes the values of its own registered properties (as the result of user interaction with a dialog or other interface element called by DoUIService, for example), be sure to call the RecordInitialValues and RecordFinalValues methods. This ensures that changes made through the dialog are placed in the undo-redo transaction buffer.
Note
If you are creating an operation that acts directly on the data that underlies a visualization, consider using the IDLitDataOperation class rather than the IDLitOperation class. IDLitDataOperation provides additional automation of the Undo/Redo mechanism.
Syntax
Result = Obj->[IDLitOperation::]DoAction(Tool)
Return Value
If successful, this method returns an IDLitCommandSet object or array of IDLitCommandSet objects that will be placed in the iTool's command buffer. The command set object will be passed to the UndoOperation and RedoOperation methods as necessary. If not successful, this method returns a null object reference.
Note
The OPERATION_IDENTIFIER property of the command set object returned by the IDLitOperation::DoAction method is set equal to the full identifier of the operation itself. This implies that UndoOperation and RedoOperation methods exist for the operation, and that they implement the necessary undo and redo mechanisms. If you are overriding this method, you must either ensure that the appropriate UndoOperation and RedoOperation methods exist, or manually create an IDLitCommandSet object with the OPERATION_IDENTIFIER set to another operation that is capable of undoing or redoing the changes made by your method.
Arguments
Tool
An object reference to the iTool object on which the operation executes.
Keywords
None
Version History