Fix imports, length coercion, script sample

This commit is contained in:
James Roseborough
2011-03-03 18:27:21 +00:00
parent a88789517d
commit 90839804ef
3 changed files with 4 additions and 16 deletions

View File

@@ -116,7 +116,7 @@ public class ScriptEngineSample {
CompiledScript cs = ((Compilable)e).compile(
"test = test or luajava.newInstance(\"java.lang.String\", \"test\")\n" +
"print( 'test', type(test), test, tostring(test) )\n" +
"return test:toString()");
"return tostring(test)");
Bindings b = e.createBindings();
Object resultstring = cs.eval(b);
b.put("test", new SomeUserClass());