Use a class
- Last Updated: October 21, 2024
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Until now, you have learned how to write ABL code to define the parts of a class including data members, constructors, methods, and a destructor. When you develop an ABL class, you must provide ABL code for the bodies of your constructors, methods, and the destructor.
The topics in this section describe how to access data members and methods within a class.
You can access PUBLIC data members and
methods of a class instance from any part of your application. To do this, you must
create or obtain an instance of the class you want to access. Once you have the
reference to the instance, you can access any of its PUBLIC data members and methods.
For example, a Dept class may have to
access instances of the Emp class because the Emp class maintains information about employees.