Re: Singleton and NSTimer
Re: Singleton and NSTimer
- Subject: Re: Singleton and NSTimer
- From: Zach Wily <email@hidden>
- Date: Wed, 6 Jul 2005 16:04:07 -0600
You need to schedule the timer on a run loop in order for it to fire:
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
ObjC_classic/Classes/NSRunLoop.html#//apple_ref/doc/uid/20000321-
addTimer_forMode_
On Jul 6, 2005, at 3:59 PM, Brad Peterson wrote:
Hi all,
I have a singleton object which, in its init method,
creates a timer:
[ NSTimer timerWithTimeInterval: 4 target: self
selector: @selector(timedPurge) userInfo: nil repeats:
YES ];
While I can tell that the timer is created, it never
seems to fire.
Is this some limitation I'm otherwise unaware of?
Thanks!
__________________________________
Yahoo! Mail for Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
_______________________________________________
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
_______________________________________________
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