PROCESS EVENTS statement
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Processes all outstanding events without blocking for user input.
Syntax
|
Example
This procedure counts to 1,000 until you choose STOP:
r-proevs.p
|
On each pass through the loop, the procedure
displays the new value of ix and then checks whether
any events are waiting to be processed. If no events have occurred,
execution continues and the loop iterates. If the STOP button has
been chosen, that event is processed changing the value of stop-sel.
When execution continues, the program exits the loop.
If the loop does not contain the PROCESS EVENTS statement, the choose event never processes and the loop iterates until ix equals 1,000.
Notes
- The WAIT-FOR statement processes all pending events and blocks all other execution until a specified event occurs. The PROCESS EVENTS statement processes all pending events and immediately continues execution with the next statement.
- If there are any asynchronous requests for which PROCEDURE-COMPLETE events have been received but not yet processed, this statement processes these events as described for the WAIT-FOR statement.
- You cannot call the .NET method system.Windows.Forms.Application:DoEvent( ) in ABL. The PROCESS EVENTS statement performs the function of this method.
- .NET can raise exceptions in the context of an ABL session when this statement executes.
- In the context of the .NET blocking method,
System.Windows.Forms.Application:Run( ), if you execute the PROCESS EVENTS statement for a non-modal ABL window from within a user-defined function or non-VOID method, this statement raises the STOP condition. For more information on the .NETApplication:Run( )method, see the reference entry for the WAIT-FOR statement (.NET and ABL).
See also
WAIT-FOR statement (ABL only), WAIT-FOR statement (.NET and ABL)