Try OpenEdge Now
skip to main content
Object-oriented Programming
Getting Started with Classes, Interfaces, and Objects : Using the CLASS construct : Defining class-scoped handle-based objects
 

Defining class-scoped handle-based objects

Handle-based objects that include static widgets (visual objects), streams, and work-tables can only be defined in a class definition as PRIVATE and can only be referenced within the class file that defines them. Therefore, they are not members of the class in which they are defined, but are resources that can be referenced by other executable class elements, including properties, methods, and triggers.
This is the syntax for defining class-scoped handle-based objects:

Syntax

DEFINE [ PRIVATE ]
  { BROWSE | BUTTON | FRAME | IMAGE | MENU |
     RECTANGLE | STREAM | SUB-MENU | WORK-TABLE }
  object-name[object-definition] .
object-name
The name of the static widget, stream, or work-table.
The object-name must be unique among all handle-based objects of the same type in the defining class. This name cannot be an ABL reserved keyword.
object-definition
The remaining syntax available for defining the static widget, stream, or work-table.
The use of these objects within a class definition is much the same as their use within a procedure. For more information on using widgets within a class definition, see Defining and using widgets in classes.