Whats the best way to stop this app crash when buttons rapidly pressed iphone obj-c

Posted by dubbeat on Stack Overflow See other posts from Stack Overflow or by dubbeat
Published on 2010-03-23T10:08:49Z Indexed on 2010/03/23 10:13 UTC
Read the original article Hit count: 328

Filed under:
|

Hi,

I'm not entirely sure why this crash is happening and I'd like to get advice on the best way to deal with it.

My app has 3 buttons. Each button requests a different XML file from a server which is used to populate a table view.

If I rapidly press the buttons in sequence , button 1 button 2 button3 button 1 button 2 button3 button 1 button 2 button3 the application quits.

What could be causing this. Would id be in the NSURLRequest side of things or the table view population side?

How would you suggest I stop this behaviour? I was going to just set a boolean "isRequesting" to true when a button is pressed and set it to false when the table view is finished populating. If any button is pressed while isRequesting is True they do nothing.

Does that sound wise or is there a better way?

Thanks, dub

© Stack Overflow or respective owner

Related posts about iphone

Related posts about crash