SHIP:Sail:getChildIndex

From Serious Documentation
Revision as of 04:25, 28 December 2012 by Admin (talk | contribs)
Jump to: navigation, search

See Also:

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

getChildIndex

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

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(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