Re: "unused" NSTimer variable
Re: "unused" NSTimer variable
- Subject: Re: "unused" NSTimer variable
- From: Matt Budd <email@hidden>
- Date: Fri, 26 Sep 2003 16:37:32 -0600
Try declaring it and initializing it on two seperate lines:
NSTimer *statusTimer;
statusTimer = [NSTimer scheduledTimerWithTimeInterval: 5.0 target:self
selector:@selector(checkStatus) userInfo:nil repeats:YES];
- Matt
On Friday, September 26, 2003, at 04:24 PM, Chris Garaffa wrote:
Hey all,
I'm of the mindset that one should try to get rid of all warnings that
show up when compiling a program, which is why I'm asking this. I use
an NSTimer in my application, set up like this in an awakeFromNib:
NSTimer *statusTimer = [NSTimer scheduledTimerWithTimeInterval: 5.0
target:self selector:@selector(checkStatus) userInfo:nil repeats:YES];
When I compile, the only warning I get is "unused variable
'statusTimer'." However, my timer works just fine, no problems at all.
Is there something I should/could do to get rid of the warning, or is
it harmless?
Thanks
--
Chris Garaffa
email@hidden
_______________________________________________
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.
_______________________________________________
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.