let foo.getAttribute("listeners") return the number of listeners attached
to props.Node foo (shall be used in debug.nas and possibly props.nas)
This commit is contained in:
parent
1ec6acce39
commit
ef3fb93056
1 changed files with 1 additions and 0 deletions
|
@ -83,6 +83,7 @@ static naRef f_getAttribute(naContext c, naRef me, int argc, naRef* args)
|
|||
SGPropertyNode::Attribute attr;
|
||||
if(!a) a = "";
|
||||
if(!strcmp(a, "children")) return naNum((*node)->nChildren());
|
||||
else if(!strcmp(a, "listeners")) return naNum((*node)->nListeners());
|
||||
else if(!strcmp(a, "tied")) return naNum((*node)->isTied());
|
||||
else if(!strcmp(a, "alias")) return naNum((*node)->isAlias());
|
||||
else if(!strcmp(a, "read")) attr = SGPropertyNode::READ;
|
||||
|
|
Loading…
Add table
Reference in a new issue