SHIP:Sail:getChildCount

From Serious Documentation
Revision as of 16:55, 4 December 2012 by Admin (talk | contribs) (Created page with "SHIP Sail Reference Home == getChildCount == Gets a count of the total number of child nodes within an enclosing parent node. == Prototype == <code>count = g...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SHIP Sail Reference Home

getChildCount

Gets a count of the total number of child nodes within an enclosing parent node.

Prototype

count = getChildCount(parentNode);

Parameters/Return Value

Parameter Data Type Description
parentNode Node The node to look in for children
Return Integer number of direct children within the parent node

Detailed Description

The getChildCount(parent) function returns the number of direct children within the 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