Additionally, add [timer invalidate] to your -windowWillClose or -
dealloc method to make sure the timer is stopped and removed from the
run loop.
Well, in that case he'd better add timer=nil to stopWatch ;-)
--
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice
I'm trying to make a stopwatch application, and I'm having trouble
getting the Timer to fire, and then having the Text field being updated.
Here's the code:
AppController.h
@interface AppController : NSObject {
IBOutlet NSTextField *textField;
I'm trying to make a stopwatch application, and I'm having trouble
getting the Timer to fire, and then having the Text field being
updated.
Here's the code:
The essential part is missing: the method in which you are updating
your text field.
- (IBAction)startWatch:(id)sender
{
Thanks. That solved many issues.
However, I still have another question.
How about if I wanted the Timer to start at from 0, and then go to
1, 2, 3, etc..., not from January 1st like -
timeIntervalSinceReferenceDate does? I tried doing
timeIntervalSinceDate:, but it wouldn't work, and