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
..Before replaces or inserts a procedure before the other procedures in:
  • a Procedure variable.
  • WEBDEV - Server code 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()
WindowsLinux
// Specify the event to run on a click
BTN_BUTTON1..Process[trtClick] = myProcedure1
 
// Add a procedure to run on a click
BTN_BUTTON1..Process[trtClick] += myProcedure2
 
// Add a procedure to run before the click process
BTN_BUTTON1..Process[trtClick]..Before += myProcedure3
Syntax

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

<Element>..Before = <WLanguage procedure>
<Element>: Character string
Element to use:
  • Name of Procedure variable.
  • WindowsLinux 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.

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

<Element>..Before += <Procedure>
<Element>: Character string
Element to use:
  • Name of Procedure variable.
  • WindowsLinux Event of a control. The events of a control can be handled by ..Process.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure that must be placed "before".
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]..Before+= MyProc1
BTN_Button2..Process[trtClick]..Before+= 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