Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Using COM Objects in ABL : Accessing COM object properties and methods : Restrictions on property and method references : Default properties and methods
 
Default properties and methods
The COM standard allows for default properties and methods. For any COM object, the default property or method is invoked when you reference only the COM object handle. For example, Item is the default (indexed) property for collection objects. However, ABL requires that you specify all properties and methods you want to reference, whether or not they are defaults for the COM object. For example:
DEFINE VARIABLE hCollection AS COM-HANDLE NO-UNDO.

/* ... Set hCollection to a collection COM object ... */
hCollection:Item(1). /* This is legal in ABL. */
hCollection(1).    /* This is not legal in ABL. */