PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Use conditions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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.
Example
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.
Component : wd250obj.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment