PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Creates and runs a custom action (defined by 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 PROCÉDURE ProcCreateCap(sCap)
pNew is Control
pNew <- ControlCreate("STC_" + GetIdentifier(), typStatic, 0, 0, 100, 20, True)  
pNew..Caption = sCap
ActionDeclareUndo(ProcCancel)
INTERNAL PROCÉDURE ProcCancel()
ControlDelete(pNew)
END
END
Syntax

Creating and running a custom action Hide the details

ActionDo(<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 call ActionDeclareUndo. The actions of this procedure will be taken into account in Undo/Redo.
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.
<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 Name>, <Procedure Name> [, <Parameter 1>, ...,  <Parameter N>])
<Window Name>: Character string (with or without quotes)
Name of window or internal window to use.
<Procedure Name>: Character string (with or without quotes)
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 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) then eventually redo it (CTRL + Y or call to ActionRedo).
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment