ABL mechanisms
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Ultimately, the differences between COM objects and
widgets require separate but related mechanisms in ABL to work with
them. The most fundamental of these mechanisms are the handles you
use to access COM objects and widgets. You must access widgets with
widget handles and COM objects with component handles. These handles
have different data types that represent the different capabilities
that they support—the HANDLE data type for widget
handles and the COMPONENT-HANDLE (or COM-HANDLE)
data type for COM objects.
COM-HANDLE values have a data type that is compatible
with most other ABL data types. For component handles, ABL does
the data conversion automatically, unlike widget handles which require
the use of ABL data conversion functions, like STRING or INTEGER.
The following table compares each type of object (COM object and ABL widget) and summarizes how it is supported in ABL.
| Feature | COM object support | ABL widget support |
|---|---|---|
| Compilation | No compile-time checking | Compile-time checking for attribute and method references |
| Instantiation | Dynamic, with different mechanisms for Automation objects and ActiveX controls | Static or Dynamic, depending on the widget and application |
| Handle type | COM-HANDLE |
HANDLE |
| Handle validity | VALID-HANDLE function |
VALID-HANDLE function |
| Access to data | Properties (optionally indexed) | Attributes |
| Access to behavior | Methods (with unnamed parameters) | Methods (with unnamed parameters) |
| Access to events | Event procedures (with unnamed parameters) | Triggers |
| Integration with ABL data | Extensive automatic mapping between COM data types and ABL data types | Full integration with ABL data types and ABL data management |
| Color management | RGB color values (RGB-VALUE function,
GET-RGB-VALUE method on the COLOR-TABLE system
handle) |
Index numbers of RGB color values in ABL color table
(COLOR-TABLE system handle) |
| Dynamic object management | RELEASE OBJECT statement |
DELETE Widget statement |
The remainder of the topics in this section describe the equivalent mechanisms that support COM objects.