Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : FIRST-OBJECT attribute
 

FIRST-OBJECT attribute

The object reference for the first class instance in the list of all valid ABL and .NET class instances created in the current ABL session. If there are no class instances in the current session, this attribute returns the Unknown value (?).
Data type: Progress.Lang.Object
Access: Read-only
Applies to: SESSION system handle
Once you get the first object reference in the list, you can use the NEXT-SIBLING property in the Progress.Lang.Object class to get the next entry in the list of ABL and .NET object references.
There are two points worth noting about this attribute with garbage collection enabled:
*The object references maintained by the FIRST-OBJECT attribute and the NEXT-SIBLING property do not count as references for garbage collection. That is, if a class instance is referenced only on the session object chain, it is available for automatic garbage collection.
*When an ABL object that inherits from a .NET object is on the session object chain, it can have circular references that prevent it from being deleted (as with pure ABL objects). When there are no more ABL references to such an ABL-derived .NET object, the object is removed from the object chain, but may still be instantiated because of references to it from .NET. If the application re-obtains a reference to the object in ABL by getting it from .NET, the reference is again placed on the object chain.
Note: To obtain the first .NET form or ABL FormProxy object in the list of all valid form objects created in the current ABL session, use the FIRST-FORM attribute.

See also

FIRST-FORM attribute, LAST-OBJECT attribute, NEXT-SIBLING property, Progress.Lang.Object class