EvaluatorException in helma 1.6.2

View: New views
2 Messages — Rating Filter:   Alert me  

EvaluatorException in helma 1.6.2

by Klemens-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

get a "parsing error" in newest helma 1.6.2 for this:
function main_action() {
   java.lang.Thread.currentThread().yield(); //here is the error
   res.debug("dubudibidu");
}

[2008/04/09 16:35:22] [ERROR] null:
org.mozilla.javascript.EvaluatorException: missing name after .
operator (/Users/user/helma-1.6.2/apps/helmaBug/Root/actions.js#2)
org.mozilla.javascript.EvaluatorException: missing name after .
operator (/Users/user/helma-1.6.2/apps/helmaBug/Root/actions.js#2)
        at helma.scripting.rhino.RhinoCore.getValidPrototype(RhinoCore.java:408)
        at helma.scripting.rhino.RhinoCore.getNodeWrapper(RhinoCore.java:650)
        at helma.scripting.rhino.RhinoCore$WrapMaker.wrap(RhinoCore.java:1039)
        at org.mozilla.javascript.ScriptRuntime.toObject(ScriptRuntime.java:937)
        at org.mozilla.javascript.ScriptRuntime.toObject(ScriptRuntime.java:885)
        at org.mozilla.javascript.Context.toObject(Context.java:1528)
        at helma.scripting.rhino.RhinoEngine.setGlobals(RhinoEngine.java:203)
        at helma.framework.core.RequestEvaluator.initGlobals(RequestEvaluator.java:993)
        at helma.framework.core.RequestEvaluator.run(RequestEvaluator.java:211)
        at java.lang.Thread.run(Thread.java:637)


this example works fine:

function main_action() {
   java.lang.Thread.currentThread().sleep(100); //thats a static
method like yield(), but it works.
   res.debug("dubudibidu");
}

tested this on os x leopard with
Helma 1.6.2 (April 7 2008) on Java 1.6.0_04-dp

the attached "helmaBug" is an example app with one Root.main_action().

thx for your time,
--
klemens mantzos
web developer | vienna - http://knallgrau.at/


_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

helmaBug.zip (1K) Download Attachment

Re: EvaluatorException in helma 1.6.2

by Christian Langreiter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> java.lang.Thread.currentThread().yield(); //here is the error

yield is a keyword in js 1.7 (which is now the default version in  
helma). what about java.lang.Thread.currentThread()["yield"]()?

if you're not using any 1.7 features, see

        rhino.languageVersion
        http://helma.org/docs/guide/properties/listall       

-- chris
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev