Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

idonotliketostu

macrumors 6502
Original poster
Feb 28, 2008
398
0
I wrote an applescript script that would loop forever refreshing an rss feed. I use it quite often so i though it'll port it over to xcode and make it neater. When i press a button to start, the program loops and it locks up, its working but it's frozen. How do I make a start stop button looping something without making the program freeze?
 

fernandovalente

macrumors 6502
I wrote an applescript script that would loop forever refreshing an rss feed. I use it quite often so i though it'll port it over to xcode and make it neater. When i press a button to start, the program loops and it locks up, its working but it's frozen. How do I make a start stop button looping something without making the program freeze?

Do NOT use an infinite loop, it will certain crash your app. Use NSTimer for that. NSTimer is used to execute a function in a period of time you set. If I wanted to create an infinite loop, I would set it to 0.1 seconds.

Hope that helps.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.