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
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Creates and runs a custom action (defined through programming) with support of "Undo/Redo". This action is added into the list of actions performed in the window.
This action supports "Undo/Redo": it can be manipulated by functions ActionUndo and ActionReDo..
Example
ActionDo(ProcCreéLib, "Nouveau")
INTERNAL PROCEDURE ProcCreéLib(sLib)
	pNouveau is Control
	pNouveau <- ControlCreate( "LIB_" + GetIdentifier(), typStatic, 0, 0, 100, 20, True)  
	pNouveau..Caption = sLib 
	ActionDeclareUndo(ProcAnnuler)
	INTERNAL PROCEDURE ProcAnnuler()
		ControlDelete(pNouveau)
	END
END
Syntax

Creating and running a custom action Hide the details

ActionDo(<WLanguage procedure> [, <Parameter 1> [... [, <Parameter N>]]])
<WLanguage procedure>: Procedure name
Name of WLanguage procedure to run. The code of this procedure must call ActionDeclareUndo. The actions of this procedure will be taken into account in Undo/Redo.
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.
<Parameter N>: Any optional type
Nth optional parameter that will be passed to the procedure.

Creating and running a custom action linked to a window Hide the details

ActionDo(<Window> , <WLanguage procedure> [, <Parameter 1> [... [, <Parameter N>]]])
<Window>: Window name
Name of the window or internal window to be used.
<WLanguage procedure>: Procedure name
Name of WLanguage procedure to run. The code of this procedure must call ActionDeclareUndo. The actions of this procedure will be taken into account in Undo/Redo.
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.
<Parameter N>: Any optional type
Nth optional parameter that will be passed to the procedure.
Remarks
  • If the window name is specified (syntax 2), ActionDo is equivalent to WinEdDo.
  • When running the procedure associated with ActionDo, ActionDeclareUndo must be called, otherwise a WLanguage error occurs. The end user can undo this action (Ctrl + Z or ActionUndo) and eventually redo it (Ctrl + Y or ActionRedo).
Component: wd300obj.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/25/2025

Send a report | Local help