PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Exiting from the sequence of procedures
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
..After replaces or inserts a procedure after the other procedures in:
  • a Procedure variable.
  • Windows an event associated with a control.
Example
p is PROCEDURE
p = MyProcedure
p..After = MyProcedureCalledAfter
p..Before = MyProcedureCalledBefore

// The order for calling the procedures will be:
// - MyProcedureCalledBefore
// - MyProcedure
// - MyProcedureCalledAfter
p()
Windows
// Specify the process to run on a click
BTN_BUTTON1..Process[trtClick] = myProcedure1
 
// Add a procedure to run on a click
BTN_BUTTON1..Process[trtClick] += myProcedure2
 
// Adds a procedure to run after the click process
BTN_BUTTON1..Process[trtClick]..After += myProcedure3
Syntax

Replacing the existing procedures saved with ..After (= operator) Hide the details

<Element>..After = <WLanguage procedure>
<Element>: Character string
Element to use:
  • Name of Procedure variable.
  • Windows Event of a control. The events of a control can be handled by ..Process.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure that will replace the existing procedures. This parameter must not be enclosed in quotation marks.

Inserting a procedure after the existing procedures (+= operator) Hide the details

<Element>..After += <WLanguage procedure>
<Element>: Character string
Element to use:
  • Name of Procedure variable.
  • Windows Event of a control. The events of a control can be handled by ..Process.
<Language procedure>: Procedure name
Name of the WLanguage procedure that must be placed "after". This parameter must not be enclosed in quotation marks.
Remarks

Exiting from the sequence of procedures

If several procedures are sequenced, the sequence of procedures can be interrupted from the code of one of the procedures by using ReturnToCapture.
Example:
// Click on BTN_Button1
BTN_Button2..Process[trtClick]..After += MyProc1
BTN_Button2..Process[trtClick]..After += MyProc2
// Click on BTN_Button2
Trace("Button 2 clicked")
PROCEDURE MyProc1()
Trace(dbgInfo(dbgProcess))
ReturnToCapture(MySelf..Name)
PROCEDURE MyProc2()
Trace(dbgInfo(dbgProcess))
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment