Use other classes
- Last Updated: August 17, 2021
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
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.
If you are using packages and package-level access modes, then the
instance reference allows you to access PACKAGE-PRIVATE
and PACKAGE-PROTECTED members from other classes within
the same package.
For example, a Dept class may have to
access instances of the Emp class because the Emp class maintains information about employees.
Note: You can create instances of
other classes and access them from procedures as well as from constructors and
methods.