Re: Experimenting with Timers
Re: Experimenting with Timers
- Subject: Re: Experimenting with Timers
- From: Angela Brett <email@hidden>
- Date: Mon, 22 Oct 2001 01:30:22 +1300
-(id) UpdateCurrentTime: (NSTimer) Timer
{
[CurrentTime setObjectValue: [NSCalendarDate date]];
return self;
}
- (IBAction)ASet:(id)sender
{
SEL UCT = @selector(UpdateCurrentTime:);
[NSTimer scheduledTimerWithTimeInterval:(NSTimeInterval)1 target:(id)nil
I'd say you have to have 'self' as the target (assuming that
UpdateCurrentTime: and ASet: are in the same object.) You definitely
shouldn't have 'nil' as the target, or the timer will just send a
message to nowhere every second, unless I'm mistaken.
--
Angela Brett email@hidden
http://acronyms.co.nz/angela
"We must believe in free will, we have no choice!" -- Isaac Bashevis Singer