Re: Timers in a Foundation Tool
Re: Timers in a Foundation Tool
- Subject: Re: Timers in a Foundation Tool
- From: Phil Larson <email@hidden>
- Date: Fri, 4 Jul 2003 15:10:57 -0700
On Friday, July 4, 2003, at 1:52 PM, Brian Ganninger wrote:
void launchEngine()
{
NSLog(@"Hello again...");
}
This is a function not a method. If you want to use an NSTimer you're
going to have to have a class with a method signature:
- (void)launchEngine:(id)sender;
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:2
target:nil selector:launchEngine() userInfo:nil repeats:TRUE];
After you make your class you can then send @selector(launchEngine:) as
the argument for selector. launchEngine() is a function not a
selector/method.
Phil Larson
_______________________________________________
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.