function calledFromJava(factory)
-- works:
local testObject = factory:createObject()
-- does not work:
testObject:test();
end
calling the lua method calledFromJava from java and calling factory:createObject() in lua work fine but I can't call any method of the returned testObject.
I like to do something like that:
function calledFromJava(factory)
-- works:
local testObject = factory:createObject()
-- does not work:
testObject:test();
end
calling the lua method calledFromJava from java and calling factory:createObject() in lua work fine but I can't call any method of the returned testObject.
My java createObject method looks like that:
public LuaValue createObject() {
LuaValue componentLua = CoerceJavaToLua.coerce(new TestObject());
return componentLua;
}
What is the difference between passing a java object as an argument and returning an object to lua?
Is it correct that the metadata field of componentLua:
LuaValue componentLua = CoerceJavaToLua.coerce(new TestObject());
if null?
thanks!
Solved: from a private discussion with Jim: use the latest version 3.0 beta2 and return the java object directly:
public TestObject createObject() {
return new TestObject();
}