Options for referencing static members
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
In most cases, you can reference a static member by
name, with or without a type-name prefix, depending on the access
modes that it supports. For each kind of static member that supports
the PUBLIC access mode, you can, with one exception,
reference the member by prefixing the member name with the object
type name of the class that defines it. For all other static members,
you can only reference them by name, according to their kind. You
can use this type-name prefix to reference the member name as specified
for static type-name syntax. For more information, see Use static type-name syntax.
Therefore, you can use static type-name syntax to reference
the following kinds of static members, all of which support the PUBLIC access
mode:
- Variable data members
- Properties
- Named methods (not constructors or destructors)
- Class events
If it has been named with a reserved keyword, accessing a static variable data member, property, method, or class event within the class in which it is defined requires static type-name syntax as a qualifier.
You cannot use static type-name syntax to reference the
following kinds of static members, all of which do not support
the PUBLIC access mode:
- Buffers
- Data-sources
- ProDataSets
- Queries
- Temp-tables
For these kinds of static members, you can only reference them
by name, exactly like instance members, as defined for the type
of member. For example, to reference the default buffer of a statically
defined temp-table, you precede the temp-table name with the BUFFER keyword.