1
0
Fork 0

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:
mfranz 2007-05-07 14:23:56 +00:00
parent 1ec6acce39
commit ef3fb93056

View file

@ -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;