If I run this from a plugin and have a listener that catches eventName. In the function…
listener(event)
Can I call event.value and get the value I pass?
I think this is causing problems.
private void sendEvent(String eventName, String eventText) { Log.d("TEST", "Sending Event: " + eventName + " - " + eventText); try { if (fListener != CoronaLua.REFNIL) { LuaState L = fParentRuntime.getLuaState(); CoronaLua.newEvent(L, eventName); L.pushString(eventText); L.setField(-2, "value"); CoronaLua.dispatchEvent(L, fListener, 0); Log.d("TEST", "Success, sent event!"); } else { Log.d("TEST", "Success, but listener is null"); } }); catch (Exception ex) { ex.printStackTrace(); Log.d("TEST", "Success, EXCEPTION during event call."); } }