Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : Object name references
 

Object name references

An object-name-reference can have the following syntax, depending on the static handle-based object:

Syntax

[ object-type ] object-name
The object-type is the type of the static handle-based object specified in the DEFINE statement for the handle-based object, such as FRAME in the DEFINE FRAME statement or TEMP-TABLE in the DEFINE TEMP-TABLE statement. For a data representation widget associated with a field or variable, object-type is the widget specified using the VIEW-AS phrase, such as COMBO-BOX for VIEW-AS COMBO-BOX.
The object-name is the name that you specify for the static handle-based object using the DEFINE statement for the handle-based object. For a data representation widget, it is the name of the field or variable associated with the widget.
For static frame fields, you only need to provide the object-name (field or variable name) to reference the associated widget, and ABL looks for its data representation widget in a frame. However, for most other static handle-based objects, you must qualify the object-name with the object-type, for example, BUFFER Customer, QUERY qCust, or TEMP-TABLE ttCust.
For example, in this code fragment, the handle to a frame field (dDate) and the handle to a buffer object (bCust) are both returned and assigned to handle variables using the HANDLE attribute of each handle-based object:
DEFINE VARIABLE hField  AS HANDLE NO-UNDO.
DEFINE VARIABLE hObject AS HANDLE NO-UNDO.
DEFINE VARIABLE dDate   AS DATE   NO-UNDO VIEW-AS FILL-IN.

DEFINE BUFFER bCust FOR Customer.

DEFINE FRAME AFrame
  dDate  bCust.Name.

hField  = dDate:HANDLE /* Widget name found in frame AFrame */.
hObject = BUFFER bCust:HANDLE.