Re: Luaj is not Invocable
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Luaj is not Invocable
- From: Philippe Lhoste <PhiLho@...>
- Date: 2012年10月25日 14:22:39 +0200
My question about Invocable is still pending, but I found an answer about how to call a
Lua function:
CompiledScript script = ((Compilable) scriptEngine).compile(reader);
Bindings sb = new SimpleBindings();
script.eval(sb);
LuaFunction luaFun = (LuaFunction) sb.get("calledByJava");
luaFun.call(param);
The script flow must reach the function definition, of course.
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --