Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Using COM Objects in ABL : How COM objects differ from ABL widgets : ABL mechanisms
 
ABL mechanisms
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.
Table 59. COM objects and ABL widgets compared
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 this chapter describes the equivalent mechanisms that support COM objects.