Coding event procedure names
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Coding event procedure names
ABL supports two types of OCX event procedures, distinguished by the procedure name:
- Control-bound event procedures that handle a specific event for a specific control instance
- Generic event procedures that handle a specific event for all ActiveX controls in the application
The names for control-bound event procedures contain three parts, delimited by a period (.). Each part can be quoted if it contains embedded spaces:
- The name of the control-frame (the
NAMEattribute value of the control-frame widget - The name of the ActiveX control (the Name property value set in the Property Editor)
- The name of the event that is handled by the procedure
As
with all internal procedures that you add in the AppBuilder, the PROCEDURE statement
and procedure name is not visible in the Section Editor. However,
this is one that you or the AppBuilder might code:
|
This begins the definition for a procedure to handle the SpinUp event for the control named CSSpin in the control-frame named CtrlFrame.
The names for generic event procedures contain two parts, delimited by a period (.):
-
ANYWHERE - The name of the event that is handled by the procedure
The AppBuilder does not provide a mechanism to generate generic event procedures. You must code these yourself in the AppBuilder using the New Procedure dialog box, or you can add them to an external procedure file. For example:
|
A generic event procedure with this name handles the SpinUp event for any control instance that does not have a control-bound event procedure defined for the SpinUp event.