Model:getNodeChild

Edit

Given a parent node, this function returns the index of its first child, or nil if it doesn't have any children.

This, together with Model:getNodeSibling, can be used to iterate the tree of nodes in a model.

child = Model:getNodeChild(node)

Arguments

NameTypeDescription
nodestring | number The name or index of the parent node.

Returns

NameTypeDescription
childnumber | nil The index of the node's first child, or nil if the node doesn't have any children.

See also