• 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
Re: Experimenting with Timers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Experimenting with Timers
      • From: "Erik M. Buck" <email@hidden>
References: 
 >Experimenting with Timers (From: Isaac Sherman <email@hidden>)

  • Prev by Date: Re: Undo redux: NSTextView/NSUndoManager badly broken (really)
  • Next by Date: Re: Dragging, IB style
  • Previous by thread: Experimenting with Timers
  • Next by thread: Re: Experimenting with Timers
  • Index(es):
    • Date
    • Thread