Titanium Community Questions & Answer Archive

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

Animation.removeEventListener causes crash

Hi all,

Exactly as described here:

http://developer.appcelerator.com/question/5041/removeeventlistener-crashes

Using removeEventListener causes my iPad app to crash out, with information given as to why. Does anyone know of a way around this?

Thanks,

Toby

— asked September 29th 2010 by Toby Mathews
  • animation
  • ipad
0 Comments

2 Answers

  • How are you removing the event?

    — answered September 29th 2010 by Dan Tamas
    permalink
    1 Comment
    • Hi Tamas,

      Removing it as per the other example, eg.

      animation.addEventListener('complete',function()
      {
         animation.removeEventListener('complete',this);
         animation.backgroundColor = 'orange';
         view.animate(animation);
      });
      

      Toby

      — commented September 29th 2010 by Toby Mathews
  • Several folks have suggested it's best to add an event listener like:

    win3.addEventListener('close', cleanUp );

    and then the function cleanUp removes the listener.

    — answered September 29th 2010 by Patrick Mounteney
    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.