i search in this news group that u can get name of the function by
doing the following if i had a Script object:

script = cx.compileString(source, filename, 1, null);
debuggable = Context.getDebuggableView(script);

int length = script.getFunctionCount();

for(int i=0; i<length; i++) {
 func = script.getFunction(i);
 String name = func.getFunctionName();
 System.out.println("function name: " + name + "\n");
}

but the name is always empty string?

i define functions like this in my js:

var foo = {
 func1: function() {...},
 func2: function() {...},
 func3: funciton() {...}
}

do i have to define function like funciton <name>() {..} to get the
name?

thanks in advance
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to