Difference between revisions of "SHIP:Data Types:Node"

From Serious Documentation
Jump to: navigation, search
(Created page with "*'''Node Home''' *'''All Data Types''' <onlyinclude>{{DataTypeTableStart|}} |{{DataType|Reference}}||Static reference to a node...")
 
Line 10: Line 10:
 
</code>
 
</code>
  
The above code is illegal since [[SHIP:Sail:getChildIndex|getChildIndex]]expects a {{DataType|Reference}} to a [[SHIP:Node|node]] but [[SHIP:Sail:getChild|getChild]] returns the [[SHIP:Node|node]] itself.</onlyinclude>
+
The above code is illegal since [[SHIP:Sail:getChildIndex|getChildIndex]] expects a {{DataType|Reference}} to a [[SHIP:Node|node]] but [[SHIP:Sail:getChild|getChild]] returns the [[SHIP:Node|node]] itself.</onlyinclude>

Revision as of 18:06, 4 February 2013

Data Type Description
Reference Static reference to a node or one of its properties.

Properties and parameters that are of type Reference must receive a value that is known at SHIPTide time, not a value that is dynamically assigned at run time. For example, the following statement will fail:

getChildIndex(getChild(myParent, index));    // fails instead of returning index

The above code is illegal since getChildIndex expects a Reference to a node but getChild returns the node itself.