Hello:
Since the last codename1 libary update we've been having problems with
the BrowserComponent on iOS. We've narrowed down the problem to the
callback registration process (which gets executed on the BrowserComponent
onLoad callback). We register two functions, but only the second one can be
invoked from javascript. The first one gets registered ok (we can see its
code from the javascript side) but fails to execute on iOS (in Android and
the simulator works fine). We tried a lot of permutations, and different
argument lengths for both functions, but the only difference we see is the
registration order. If we switch the registration order, we can only invoke
the other one (whichever gets registered last).
/*
* Registramos el callback JS de valor cambiado del checkbox "No volver a
mostrar este asistente".
*/
JSObject checkboxClickedCallback = (JSObject) javascriptContext.get("{}");
checkboxClickedCallback.set("setChecked", new JSFunction() {
public void apply(JSObject self, Object[] args) {
Log.p("->checkboxClickedCallback.setChecked()");
contexto.mostrarMensaje("checkboxClickedCallback.setChecked()");
}
});
javascriptContext.set("window.checkboxClickedCallback",
checkboxClickedCallback);
/*
* Registramos el callback JS de click en el botón "OK".
*/
JSObject okButtonClickedCallback = (JSObject) javascriptContext.get("{}");
okButtonClickedCallback.set("showMap", new JSFunction() {
public void apply(JSObject self, Object[] args) {
Log.p("->okButtonClickedCallback.showMap()");
contexto.mostrarMensaje("okButtonClickedCallback.showMap()");
}
});
javascriptContext.set("window.okButtonClickedCallback",
okButtonClickedCallback);
Please help, as it's impacting our current production code.
Kind regards,
Kandy
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/493a9217-0a4a-44b5-aede-974096f652d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.