ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Action functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 handled by ActionUndo and ActionReDo.
Example
ActionDo(ProcCreateCap, "New")
INTERNAL PROCEDURE ProcCreateCap(sCap)
pNew is Control
pNew <- ControlCreate("STC_" + GetIdentifier(), typStatic, 0, 0, 100, 20, True)  
pNew..Caption = sCap
ActionDeclareUndo(ProcCancel)
INTERNAL PROCEDURE ProcCancel()
ControlDelete(pNew)
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.
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.
<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 window or internal window to use.
<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.
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.
<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 cancel this action (Ctrl + Z or call to ActionUndo) and eventually redo it (Ctrl + Y or call to ActionRedo).
Component: wd290obj.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help