listchildrenΒΆ

nil listchildren ( Node node , string type , [ string|function pattern ] , [ boolean recursive ] )

Returns a list of nodes of a given class, matching a given name pattern. See children for more details on parameters.

The listchildren function is written as:

function listchildren (...)
    local    list = {}
    for node in children (...) do
        table.insert (list, node)
    end
    return list
end
Arguments:

  • node The node to iterate
  • type A class the children must belong to to be visited by the iterator
  • pattern A Lua's pattern used to check the name of the node, or a function that filter the node. See Lua's pattern documentation.
  • recursive if true, traverse the children recursively.