|
|
|
|
ActionDeclareUndo (Function) In french: ActionDeclareUndo Declares how to cancel an action that was added by ActionDo. This function MUST be called when running the procedure supplied to ActionDo. ActionDo(WIN_MyEditor, ProcCreateCap, "New") INTERNAL PROCEDURE ProcCreateCap(sCap) pNew is Control pNew <- ControlCreate("STC_" + GetIdentifier(), typText, 150, 150, 80, 20) pNew..Caption = sCap ActionDeclareUndo(ProcCancel) INTERNAL PROCEDURE ProcCancel() ControlDelete(pNew) END END
ActionDeclareUndo(UndoOperation, CUSTOMER.CustomerID) Â // Management of Undo INTERNAL PROCEDURE UndoOperation(nCustomerID) IF HReadSeekFirst(CUSTOMER, CustomerID, nCustomerID) THEN Â SourceToScreen() END END
Syntax
ActionDeclareUndo(<WLanguage procedure> [, <Parameter 1> [... [, <Parameter N>]]])
<WLanguage procedure>: Procedure name Name of WLanguage procedure to run. The code of this procedure must allow to cancel the action created by ActionDo.This procedure is called when pressing Ctrl + Z or during the call to ActionUndo. Remark: Using an internal procedure provides a direct access to the local variables. <Parameter 1>: Any optional type First optional parameter that will be passed to the procedure. In most cases, these parameter correspond to values used to restore the previous status. <Parameter N>: Any optional type Nth optional parameter that will be passed to the procedure. In most cases, these parameter correspond to values used to restore the previous status. Remarks Use conditions A WLanguage error occurs if this function is called outside a procedure added by ActionDo.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|