Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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;

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

— asked September 6th 2010 by u no
  • android
  • ti.app.fireevent
  • webview

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.

    — answered September 6th 2010 by Don Thorp
  • 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).

    — answered December 20th 2010 by Jeremy Rousset
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.