Difference between revisions of "SHIP:Sail:getChildIndex"

From Serious Documentation
Jump to: navigation, search
Line 12: Line 12:
  
 
== Prototype ==
 
== Prototype ==
<code>{{DataType|Integer}} getChildIndex ({{DataType|Node}} node);</code>
+
<code>{{DataType|Integer}} getChildIndex ({{DataType|Reference}} node);</code>
  
 
=== Parameters/Return Value ===
 
=== Parameters/Return Value ===
Line 20: Line 20:
 
! scope="col" style="text-align:left" | Description
 
! scope="col" style="text-align:left" | Description
 
|-
 
|-
|node||{{DataType|Node}}||The specified node you want the index of
+
|node||{{DataType|Reference}}||The specified node you want the index of
 
|-
 
|-
 
! scope="col" style="text-align:left" | Return
 
! scope="col" style="text-align:left" | Return

Revision as of 11:07, 4 February 2013

Added to SHIPEngine v4.0.211, SHIPTide v4.0.211 .

See Also:


getChildIndex

Gets a index of a node within its enclosing parent node.

Prototype

Integer getChildIndex (Reference node);

Parameters/Return Value

Parameter Data Type Description
node Reference The specified node you want the index of
Return Integer index of specified node within parent node

Detailed Description

The getChildIndex(node) function returns the index of the specified node within its direct enclosing parent.

Nodes in SHIP may have 0 or more direct child nodes. For example, a group in the resources area may have N images within the group. These children, if present, are implicitly numbered 0..(N-1) where N is the total number of children of any type within the parent node.

Examples