From ef3fb93056f2db62def966a926b81fd45eea8551 Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 7 May 2007 14:23:56 +0000 Subject: [PATCH] let foo.getAttribute("listeners") return the number of listeners attached to props.Node foo (shall be used in debug.nas and possibly props.nas) --- src/Scripting/nasal-props.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Scripting/nasal-props.cxx b/src/Scripting/nasal-props.cxx index 77c74a830..87afb1d93 100644 --- a/src/Scripting/nasal-props.cxx +++ b/src/Scripting/nasal-props.cxx @@ -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; -- 2.39.5