Re: Problems with NSTimer and NSRunLoop/CFRunLoop
Re: Problems with NSTimer and NSRunLoop/CFRunLoop
- Subject: Re: Problems with NSTimer and NSRunLoop/CFRunLoop
- From: Brendan Younger <email@hidden>
- Date: Thu, 06 Jan 2005 20:45:21 -0600
On Jan 6, 2005, at 8:32 PM, John Stiles wrote:
Unnecessary how?
If you don't attach your timer to a run loop in a mode, it doesn't
run, period.
True, but -[NSTimer
scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:]
automatically adds itself to the current run loop for the default mode.
-[NSTimer timerWithTimeInterval:etc.] doesn't add itself and needs to
be added manually. The original poster was using -[NSTimer
scheduledTimerWithTimeInterval:etc.].
To Mont Rothstein: if "performExpirationCheck:" is meant to be called
while a modal window is up in your application, you need to add the
timer to the run loop for NSModalPanelRunLoopMode since -[NSTimer
scheduledTimerWithTimeInterval:] adds itself for only
NSDefaultRunLoopMode.
Brendan Younger
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden