Accessing objects and navigating meta-levels in code
No edit summary
Line 6: Line 6:
Then one can write;
Then one can write;


if ((destinationMember as IObjectReference).ObjectInstance == null)
if ((destinationMember as IObjectReference).ObjectInstance.asObject == null)


I.e. the member as a single link - does it have an object in the other end?
I.e. the member as a single link - does it have an object in the other end?
Note! ObjectInstance is always non-null, it's the object holding information about the link-end. It can be a nullObjectImpl, which is an object

Revision as of 16:16, 1 September 2019

Single-link

A single link in runtime is implemented in a IObject as a IObjectReference, i.e. a link which points to another object.

Then one can write;

if ((destinationMember as IObjectReference).ObjectInstance.asObject == null)

I.e. the member as a single link - does it have an object in the other end?

Note! ObjectInstance is always non-null, it's the object holding information about the link-end. It can be a nullObjectImpl, which is an object

This page was edited 113 days ago on 01/11/2024. What links here