0

I'm into the production phase of my first major OSX application using xCode. It is an eCommerce app accessing eBay with numerous buttons initiating various api calls, and then parsing and displaying the results. It's gotten pretty big and as you can imagine for my first xCode app, the code structure isn't optimum. But it's in production now and I don't want to risk major restructuring.

My questions is: there are several points in the code, numerous method calls deep, where I would just like to hop back into the run loop and wait for a button press. Doing all the returns necessary to get there is not practical at this point.

Is there a method to "GOTO" the run loop?

Thanks!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Rickrcomm
  • 11
  • 2
  • 1
    If you can't afford to return all the way to the run loop, what should happen to the rest of the code in the methods that would be interrupted? – zneak Dec 10 '13 at 19:55
  • Quick! Add tests! Then your mind can be put at ease while you're rolling out v1.1. – user2864740 Dec 10 '13 at 19:58
  • Since you've already put the keywords in your question.. use [goto](http://blog.ablepear.com/2009/12/objective-c-tuesdays-goto.html)? – TheAmateurProgrammer Dec 11 '13 at 09:13
  • @TheAmateurProgrammer: Yes, I was thinking "goto" but how do I put a label on the RunLoop to go to? What would the syntax be? – Rickrcomm Dec 11 '13 at 21:17
  • @zneak: I would not be depending on the code in any of the interrupted methods. In the case I am asking about, I can just skip it with no harm. – Rickrcomm Dec 11 '13 at 21:19

0 Answers0