PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Exiting from the sequence of procedures
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
The Before property replaces or inserts a procedure before the other procedures in:
  • a variable of type Procedure.
  • WINDEVWEBDEV - Server codeUniversal Windows 10 AppiPhone/iPadIOS WidgetApple WatchMac Catalyst an event associated with a control.
Versions 21 and later
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Versions 22 and later
Android Widget This property is now available for Procedure variables in Android widget mode.
Android This property is now available for Procedure variables in Android applications.
Java This property is now available for Procedure variables in Java applications.
New in version 22
Android Widget This property is now available for Procedure variables in Android widget mode.
Android This property is now available for Procedure variables in Android applications.
Java This property is now available for Procedure variables in Java applications.
Android Widget This property is now available for Procedure variables in Android widget mode.
Android This property is now available for Procedure variables in Android applications.
Java This property is now available for Procedure variables in Java applications.
Example
p is procedure
p = MyProcedure
p.After = MyProcedureCalledAfter
p.Before = MyProcedureCalledBefore
 
// The order for calling the procedures will be:
// - MyProcedureCalledBefore
// - MyProcedure
// - MyProcedureCalledAfter
p()
WindowsLinuxUniversal Windows 10 AppiPhone/iPadIOS WidgetApple WatchMac Catalyst
// 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 existing procedures with the Before property (= operator) Hide the details

<Element>.Before = <WLanguage procedure>
<Element>: Character string
Element to use:
  • Name of a variable of type Procedure.
  • WindowsLinuxUniversal Windows 10 AppiPhone/iPadIOS WidgetApple WatchMac Catalyst Event of a control. The events of a control can be handled by the Process property.
<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 += <WLanguage procedure>
<Element>: Character string
Element to use:
  • Name of a variable of type Procedure.
  • WindowsLinuxUniversal Windows 10 AppiPhone/iPadIOS WidgetApple WatchMac Catalyst Event of a control. The events of a control can be handled by the Process property.
<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 SetFocusAndReturnToUserInput.
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))
SetFocusAndReturnToUserInput(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