Types of objects
- Last Updated: December 22, 2023
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
The fill-in field is the simplest representation of a single data field. Other ways to represent data fields include:
- Editors — For longer text strings
- Toggle boxes — For logical values
- Selection lists — For lists of valid values
- Combo boxes — For a list display that disappears when you’re not using it
- Sliders — For visual display of an integer value within a range
- Radio sets — For presenting a choice among a small set of distinct values
Among objects that do not display data values, you have already worked with buttons. In addition, ABL supports rectangles for highlighting and grouping other objects on the screen, and images to display pictures and diagrams. Menus and menu items for a window are other types of visual objects. Windows and frames are objects that serve as containers for other objects within a user interface.
The browse is a major visual object with many capabilities. Because of its special use as a display device for an entire query, detailed discussion of the browse is postponed until later, after you learn more about using queries.
Various terms describe all these objects in general. ABL syntax often uses the term widget. In other places you see the word control. But there is such variety to the display devices ABL supports that this book refers to them all as objects. Sometimes this book refers to them as basic objects or simple objects, to differentiate them from SmartObjects™. SmartObjects are procedure-based and have a great deal of additional standard behavior built into them via the ABL procedures that support them. The basic objects ABL supports run the gamut from very simple objects (such as rectangles, which are purely decorative) to complex data controls (such as the browse).
For all their variety, all basic objects have the following in common:
- You can define them in an ABL procedure using forms of the
DEFINEstatement. These are called static objects, and it is these that you focus on in this section. - You can also create them during program execution using the
CREATEstatement. These are called dynamic objects, and you learn much more about them in later sections. - They can have a handle that acts as a pointer to a control structure that describes the object. Since handles are used mostly with dynamic objects, you learn more about handles in the sections on creating and using dynamic objects.
- They respond to various events that can come from user actions or can be applied to the object programmatically.
- They support blocks of ABL code called triggers that the ABL Virtual Machine (AVM) executes when an associated event occurs.
- They have various methods defined for them, which are procedural actions you can invoke in your programs to perform tasks related to the object.
In the next sections you learn about object definitions, attributes, and methods.