1
0
Fork 0

Expose SGPropertyNode::removeAllChildren() to Nasal.

This commit is contained in:
Thomas Geymayer 2013-12-07 13:47:10 +01:00
parent 5a1a1781e2
commit fcc6d3edc2

View file

@ -575,6 +575,15 @@ static naRef f_removeChildren(naContext c, naRef me, int argc, naRef* args)
return result; return result;
} }
// Remove all children of a property node.
// Forms:
// props.Node.removeAllChildren();
static naRef f_removeAllChildren(naContext c, naRef me, int argc, naRef* args)
{
NODENOARG();
node->removeAllChildren();
return propNodeGhostCreate(c, node);
}
// Alias this property to another one; returns 1 on success or 0 on failure // Alias this property to another one; returns 1 on success or 0 on failure
// (only applicable to tied properties). // (only applicable to tied properties).
@ -683,6 +692,7 @@ static struct {
{ f_addChildren, "_addChildren" }, { f_addChildren, "_addChildren" },
{ f_removeChild, "_removeChild" }, { f_removeChild, "_removeChild" },
{ f_removeChildren, "_removeChildren" }, { f_removeChildren, "_removeChildren" },
{ f_removeAllChildren, "_removeAllChildren" },
{ f_alias, "_alias" }, { f_alias, "_alias" },
{ f_unalias, "_unalias" }, { f_unalias, "_unalias" },
{ f_getAliasTarget, "_getAliasTarget" }, { f_getAliasTarget, "_getAliasTarget" },