Skip navigation.
 
mlRe: NSTimer question...
FROM : Nathan Day
DATE : Wed Apr 13 06:15:52 2005

Is your program set to back ground only (no menu bar or Dock icon), if that is the case then there are some issues with NSTimers in this situation. I think they will only fire when you application recieves and event.

On Wednesday, April 13, 2005, at 12:58PM, John Draper <<email_removed>> wrote:

>I have a method like this...  in my main Controller...
>
>- (void)noAnswerIn:(NSTimeInterval)seconds
>{
>    // Create a new timer with the new refreshtime.
>    if (noAnswerTimeout == nil) {
>        NSLog(@"Starting no-answer timer");
>        noAnswerTimeout = [NSTimer scheduledTimerWithTimeInterval:seconds
>                                            target:self
>                                            selector:@selector(noAnswer:)
>                                            userInfo: nil
>                                            repeats:NO];
>    }
>}
>- (void)noAnswer:(id)sender
>{
>    NSLog(@"I never get here");

>    // I do my stuff here if after a period of "seconds" above expires.
>
>    // of course we have to do this to ditch our timer when done.
>    [noAnswerTimeout invalidate];    // Ditch the timer - no longer needed.
>    noAnswerTimeout = nil;            // Loose reference to it.
>
>}
>
>I never get to the noAnswer callback.  What am I missing?
>What things can I do to check into why this isn't working?
>
>John

>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Cocoa-dev mailing list      (<email_removed>)
>Help/Unsubscribe/Update your Subscription:
>http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
>This email sent to <email_removed>
>
>



Nathan Day
<email_removed>
http://homepage.mac.com/nathan_day/

Related mailsAuthorDate
mlNSTimer question... John Draper Apr 13, 04:57
mlRe: NSTimer question... Nathan Day Apr 13, 06:15
mlRe: NSTimer question... Robert Martin Apr 13, 07:29
mlRe: NSTimer question... Anthony Duer Apr 13, 08:22
mlRe: NSTimer question... daniel Apr 13, 08:43
mlRe: NSTimer question... Will Mason Apr 13, 08:49
mlRe: NSTimer question... daniel Apr 13, 08:57
mlRe: NSTimer question... Ali Ozer Apr 13, 21:48
mlRe: NSTimer question... Daniel Jalkut Apr 19, 07:07
mlRe: NSTimer question... Mirna Pena Apr 25, 20:59
mlRe: NSTimer question... Joshua Orr Apr 25, 23:25