android: Ti.App.fireEvent looses connection to event listener
hi there,
in a webView, i use
function play(id){
Titanium.App.fireEvent('play', {id:id});
}
in app.js:
...
webview = Titanium.UI.createWebView({...});
...
Ti.App.addEventListener('play', function(e)
{
var x = e.id;
doSomethingWith(x);
});
which works nice, until i refresh the webview with webview.url = …
then the connection between the listener and fireEvent is broken, at least most of the time, sometimes it works fine even after setting the new url. the url is basically the same all the time, only the query string changes.
any idea on this? thx, uno
2 Answers
-
Try a newer CI build. I think Bill fixed something along those lines. Instructions are in the Programming Guides section of the docs.
-
Don, I encounter the same problem with calls on WebView.reload() method (that I need to call when orientation changed since it won't correctly wrap HTML content by itself).
I have this bug on 1.5.1 and 1.6 (well not latest CI, but one than have less than 72hours).