Hi,

It seems that this is not the problem. I have try with this code (more
simple), but rhino maps the script as a function, no an object.

                                        String text = "var msg = 'hello'; \n 
function printMsg(){ alert
(msg);} ";
                                        Script scriptObjectPrinter 
=(Script)context.compileString
(text,"printer",0,null);
                                        ScriptableObject.putProperty(scope, 
"printer",
scriptObjectPrinter);
                                        Script scriptObjectEx = 
(Script)context.compileString
("printer.printMsg();","script",1,null);
                                        scriptObjectEx.exec(context, scope);

The result is that it can't find a method in the object "printer".

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

Reply via email to