Reference a public data member or property outside of the object that defines it
- Last Updated: May 29, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Reference a public data member or property outside of the object that defines it
Syntax
This
is the syntax for referencing a PUBLIC instance
data member or property from outside the object where it is defined:
|
Element descriptions for this syntax diagram follow:
- object-reference
- An object reference to a class instance whose class hierarchy
defines the
PUBLICdata member or property. - data-member-or-property-name
- The name of a
PUBLICdata member or property defined somewhere in the class hierarchy of object-reference.
For more information on accessing data members and properties, see the Class-based data member access and Class-based property access reference entries in ABL Reference.
The following
fragment from the acme.myObjs.CustObj sample class
shows how you can access a PUBLIC property from
outside the class instance (acme.myObjs.CreditObj)
where it is defined:
|
In the previous example, CustCreditLimit is
a publicly readable property defined in the CreditObj class.
However, its value is protected and can only be written from within
its defining class hierarchy, because the property’s SET accessor
is defined as PROTECTED. For more information on
property accessors, see Define properties within a class.