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

From Serious Documentation
Jump to: navigation, search
Line 8: Line 8:
 
|}</onlyinclude>
 
|}</onlyinclude>
 
Properties that are of type {{DataType|Node}} 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:
 
Properties that are of type {{DataType|Node}} 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:
  <code>{{SailFunc|getChildIndex}}({{SailFunc(getChild}}(myParent, index));    // fails instead of returning index</code>
+
  <code>{{SailFunc|getChildIndex}}({{SailFunc|getChild}}(myParent, index));    // fails instead of returning index</code>
  
 
The above code is illegal since {{SailFunc|getChildIndex}} expects a static reference to a [[SHIP:Node|node]], not one created at runtime through the {{SailFunc(getChild}} function.
 
The above code is illegal since {{SailFunc|getChildIndex}} expects a static reference to a [[SHIP:Node|node]], not one created at runtime through the {{SailFunc(getChild}} function.

Revision as of 05:35, 14 July 2014

See Also

Node

Data Type Description
Node Reference to a node.

Properties that are of type Node 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 static reference to a node, not one created at runtime through the Template:SailFunc(getChild function.