PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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: ActionDéclareUndo
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 PROCÉDURE ProcCreateCap(sCap)
pNew is Control
pNew <- ControlCreate("STC_" + GetIdentifier(), typText, 150, 150, 80, 20)
pNew..Caption = sCap
ActionDeclareUndo(ProcCancel)
INTERNAL PROCÉDURE ProcCancel()
ControlDelete(pNew)
END
END
ActionDeclareUndo(UndoOperation, CUSTOMER.CustomerID)

// Management of Undo
INTERNAL PROCÉDURE UndoOperation(nCustomerID)

IF HReadSeekFirst(CUSTOMER, CustomerID, nCustomerID) THEN
   SourceToScreen()
END
Syntax
ActionDeclareUndo(<Procedure Name> [, <Parameter 1>, ...,  <Parameter N>])
<Procedure Name>: Character string (with or without quotes)
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.
Note: 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.
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment