Accessing objects and navigating meta-levels in code
No edit summary
(Added Edited template with July 12, 2025.)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Edited|July|12|2025}}
<message>Write the content here to display this box</message>
=== Single-link ===
=== Single-link ===
A single link in runtime is implemented in an IObject as an IObjectReference, i.e. a link that points to another object.  
A single link in runtime is implemented in an IObject as an IObjectReference, i.e., a link that points to another object.  


Then one can write:
Then one can write:
If ((destinationMember as IObjectReference).ObjectInstance.asObject == null)
i.e., the member as a single link - does it have an object on the other end?


If ((destinationMember as IObjectReference).ObjectInstance.asObject == null)
'''Note!''' ObjectInstance is always non-null; it is the object holding information about the link-end. It can be a nullObjectImpl, which is an object.
 
i.e. the member as a single link - does it have an object on 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.
[[Category:Advanced]]
[[Category:Advanced]]
[[Category:MDriven Framework]]
[[Category:MDriven Framework]]

Latest revision as of 06:27, 20 January 2025

This page was created by Lars.olofsson@mdriven.net on 2019-08-14. Last edited by Edgar on 2025-01-20.


Single-link

A single link in runtime is implemented in an IObject as an IObjectReference, i.e., a link that 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 on the other end?

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