Re: Problems with performSelector:withObject:afterDelay:
Re: Problems with performSelector:withObject:afterDelay:
- Subject: Re: Problems with performSelector:withObject:afterDelay:
- From: Chaz McGarvey <email@hidden>
- Date: Sat, 24 Jul 2004 22:10:35 -0600
On Jul 24, 2004, at 9:20 PM, April Gendill wrote:
I was poking around in the different classes and came across NSTimer.
Would NSTimer over come this issue all together?
I'm not sure, but regardless NSTimer is a better way because what are
doing with performSelector:withObject:afterDelay: is what NSTimer was
designed for. Using performSelector:withObject:afterDelay: for
repeating code at a set interval probably does work well, but it's a
bit of a hack when we have NSTimer.
performSelector:withObject:afterDelay: has other uses.
Fortunately NSTimer is very easy to use. You should be able to change
your code to use NSTimer in a few minutes and then you can see if your
problem is solved.
On Jul 22, 2004, at 8:38 PM, April Gendill wrote:
I'm using the method in the subject to call a method every X minutes.
It works wonderfully. UNTIL, until I put the computer to sleep then
it's lost. It never steps back into the loop to call the method which
then calls itself after the aforementioned delay. Am I missing
something, is there a way to make sure that it'll start this loop up
again?
Chaz McGarvey
http://www.brokenzipper.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.