Progress
External Program
Interfaces


4GL Mechanisms

Ultimately, the differences between COM objects and widgets require separate but related mechanisms in the 4GL 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 WIDGET-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 Progress data types. For component handles, Progress does the data conversion automatically, unlike widget handles which require the use of Progress data conversion functions, like STRING or INTEGER.

Table 7–1 compares each type of object (COM object and Progress widget) and summarizes how it is supported in the 4GL.

Table 7–1: COM Objects and Progress Widgets Compared 

Feature
COM Object
Support
Progress 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
WIDGET-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 4GL data
Extensive automatic mapping between COM data types and Progress data types
Full integration with Progress data types and 4GL 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 the Progress color table (COLOR-TABLE system handle)
Dynamic object management
RELEASE OBJECT statement
DELETE Widget statement

For more information on Progress widgets and the 4GL mechanisms for managing them, see the information on widgets and handles in the Progress Programming Handbook . The rest of this chapter describes the equivalent mechanisms that support COM objects.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095