Titanium Community Questions & Answer Archive

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

Two listeners triggered at the same time, removeEventListener doesn't work

Hey, I have a listener attached to the row and the row has an icon which has another listener, why the row listener is triggered when I click over the icon? removeEventListener doesn't work. This is the code: http://pastie.org/1157225

Any help?

Thanks.

— asked September 14th 2010 by Juan Felipe Alvarez Saldarriaga
  • click
  • createtableviewrow
  • listener
  • onclick
  • removeeventlistener
1 Comment
  • I am having the exact problem. I see there is a bug report. Is it fixed in 1.6?

    — commented February 24th 2011 by Duncan Mapes

2 Answers

  • Accepted Answer

    This bit me as well. There is an excellent example here on how to make custom rows - http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/
    After 8 hours I found this report and it is accurate on the Android simulator at least.

    Workaround is to use the functionality provided for having a left icon image. See the .leftImage attribute on tableRows.

    For some unknown reason, if you do not use the .leftImage attribute and place an image in the leftimage icon position and someone clicks there very strange things will happen. For instance clicking other objects afterwards does not report the correct index.

    [edit]
    Reported this as https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/2171-android-tableviewrowleftimage-interfers-with-custom-row-clicks

    — answered October 22nd 2010 by Anders Hedberg
    permalink
    0 Comments
  • Is there a solution to this yet?

    — answered March 25th 2011 by Johan Nilsson
    permalink
    0 Comments
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.