Jason Johnston wrote:
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");
  evalFunc();

just for the records: which Cocoon version are you guys using?

Please note, that the Rhino version in trunk is *mostly* compatible with Rhino version in 2.1 branch. There are only some some minor issues - see status.xml in trunk to find out the details.
You should be able to simply replace rhino.jar in branch with the jar from 
trunk.

--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                       web(log): http://www.poetz.cc
--------------------------------------------------------------------

Reply via email to