cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject flow - evalFunc() broken in Rhino?
Date Thu, 01 Sep 2005 18:11:45 GMT
Hi all,

I have a problem with the evalFunc() in flow. I think that not only the
eval() function is broken, but as well the evalFunc().

Add the following to your flow script:

var genericDoc;
scriptString= "genericDoc='testing';";
evalFunc = new Function ("genericDoc",scriptString);
evalFunc(genericDoc);
print("xxx ",genericDoc);

The sysout gives you:
xxx undefined

That is not what the following link says (thx again Jason Johnston, for
this awesome link):
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Function#Created_By
"However, if you pass an object as a parameter to a function and the
function changes the object's properties, that change is visible outside
the function."

How can I solve this?

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Mime
View raw message