• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Timers in a Foundation Tool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Timers in a Foundation Tool


  • Subject: Timers in a Foundation Tool
  • From: Brian Ganninger <email@hidden>
  • Date: Fri, 4 Jul 2003 15:52:44 -0500

Dear List,

Sorry if this is a repeated question, but after searching the archives
for 2 hours I give. I have a foundation tool that I want to leave
running with a timer that fires every minute. Below is the non-working
test code I strapped together. I can't figure out how to target the
timer so it'll call the launchEngine companion method.

Any input is greatly appreciated.

Sincerely,
Brian Ganninger

#import <Foundation/Foundation.h>

void launchEngine()
{
NSLog(@"Hello again...");
}

int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

// insert code here...
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:2
target:nil selector:launchEngine() userInfo:nil repeats:TRUE];

sleep(1000);

[pool release];
return 0;
}
_______________________________________________
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.

  • Follow-Ups:
    • Re: Timers in a Foundation Tool
      • From: Shawn Erickson <email@hidden>
    • Re: Timers in a Foundation Tool
      • From: Phil Larson <email@hidden>
    • Re: Timers in a Foundation Tool
      • From: Jeff Harrell <email@hidden>
  • Prev by Date: Re: Basic NSGraphicsContext question
  • Next by Date: Re: Timers in a Foundation Tool
  • Previous by thread: What happened to Cocoa scitech portal?
  • Next by thread: Re: Timers in a Foundation Tool
  • Index(es):
    • Date
    • Thread