ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Action functions
  • Use conditions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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 passed to ActionDo.
Example
ActionDo(FEN_MonEditeur, ProcCréeLib, "Nouveau")
INTERNAL PROCEDURE ProcCréeLib(sLib)
	pNouveau is Control
	pNouveau <- ControlCreate("LIB_" + GetIdentifier(), typText, 150, 150, 80, 20)
	pNouveau..Caption = sLib 
	ActionDeclareUndo(ProcAnnuler)
	INTERNAL PROCEDURE ProcAnnuler()
		ControlDelete(pNouveau)
	END
END
ActionDeclareUndo(AnnulerOperation, CLIENT.IDClient)
// Gestion du Undo
INTERNAL PROCEDURE AnnulerOperation(nIDClient)
	IF HReadSeekFirst(CLIENT, IDClient, nIDClient) 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.
Note: Using an internal procedure allows direct access to 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: wd300obj.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/16/2025

Send a report | Local help