When calling a function in an external Activity, the CoronaRuntimeTask is never executed.
Thoughts?
Here is code that demonstrates what I have observed.
[code]
public class SomeActivity extends Activity {
private com.naef.jnlua.LuaState luaState;
public void performCallback() {
final com.ansca.corona.CoronaRuntimeTaskDispatcher dispatcher = new com.ansca.corona.CoronaRuntimeTaskDispatcher(luaState);
// Still good…
com.ansca.corona.CoronaEnvironment.getCoronaActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
// Still good…
com.ansca.corona.CoronaRuntimeTask task = new com.ansca.corona.CoronaRuntimeTask() {
@Override
public void executeUsing(com.ansca.corona.CoronaRuntime runtime) {
// NOT CALLED
}
};
dispatcher.send(task);
}
});
// Return 0 since this Lua function does not return any values.
return 0;
}
}
[/code] [import]uid: 169919 topic_id: 35742 reply_id: 335742[/import]