Difference between revisions of "SHIP:Sail:getChildIndex"

From Serious Documentation
Jump to: navigation, search
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
{{SailFuncTableStart|}}<onlyinclude>
 
{{SailFuncTableStart|}}<onlyinclude>
|{{SailFunc|getChildIndex}}||{{DataType|String}}||1||v4.0.211||Gets the index of a {{DataType|Node}} within its enclosing parent {{DataType|Node}}.</onlyinclude>
+
|{{SailFunc|getChildIndex}}||{{DataType|Integer}}||style="text-align:center;"|v4.0.211||Gets the index of a {{DataType|Node}} within its enclosing parent {{DataType|Node}}.</onlyinclude>
 
|}
 
|}
 
== See Also: ==
 
== See Also: ==
Line 10: Line 10:
 
== Prototype ==
 
== Prototype ==
  
<code>{{DataType|Integer}} {{SailFunc|getChildIndex}}({{DataType|Node}} parentNode);</code>
+
<code>{{DataType|Integer}} {{SailFunc|getChildIndex}}({{DataType|Node}} node);</code>
 
=== Parameters/Return Value ===
 
=== Parameters/Return Value ===
 
{| class="wikitable" style="margin: 1em 1em;"  
 
{| class="wikitable" style="margin: 1em 1em;"  
Line 31: Line 31:
  
 
== Examples ==
 
== Examples ==
 +
 +
[[Category:Node Functions]]

Latest revision as of 17:51, 14 December 2016

Function Returns Introduced Description
getChildIndex Integer v4.0.211 Gets the index of a Node within its enclosing parent Node.

See Also:

Prototype

Integer getChildIndex(Node node);

Parameters/Return Value

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

Detailed Description

The getChildIndex 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