cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Johnston <>
Subject Re: flow - java.util.Object[] {something} causes syntax Error
Date Thu, 25 Aug 2005 13:41:37 GMT
Thorsten Scherler wrote:
> On Wed, 2005-08-24 at 16:45 -0500, Antonio Gallardo wrote:
>>AFAIK, Thorsten already tried eval() and does not work. :-(
> Yeah, Antonio is right.
> The eval() gives "Calling eval() with anything other than a primitive
> string value will simply return the value. Is this what you intended?". 
> ...and that is not what I was intended. ;-)

Hmm, you're right, I just tried it myself and got the same thing. 
eval() must be broken in Rhino.

Another possibility: use the "new Function(string)" constructor to 
create a function from a string and then call it, for example:

   var evalFunc = new Function("string of JS code to evaluate here");

If you want to pass particular arguments to it you can do that too; more 
details at

View raw message