10-13-2010, 11:53 PM
#1 (permalink )
Registered Member
Join Date: Jul 2010
Posts: 72
NSTimer warning
Call to scheduledTimerWithTimeInterval: target: selector: userInfo: repeats:
is not getting executed and giving a warning.
warning: 'NSTimer' may not respond to '-scheduledTimerWithTimeInterval:Target:selector:use rInfo:repeat:'
Suggestions to resolve this problem??
Thanks,
San
10-14-2010, 12:40 AM
#2 (permalink )
Pro. Game Developer
iPhone Dev SDK Supporter
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,176
Quote:
Originally Posted by
santosh_kumar
Call to scheduledTimerWithTimeInterval: target: selector: userInfo: repeats:
is not getting executed and giving a warning.
warning: 'NSTimer' may not respond to '-scheduledTimerWithTimeInterval:Target:selector:use rInfo:repeat:'
Suggestions to resolve this problem??
Thanks,
San
You've got the method name spelled two different ways in your post. Which spelling is actually used in your source code?
10-14-2010, 01:51 AM
#3 (permalink )
Registered Member
Join Date: Jul 2010
Posts: 72
Hi
[NSTimer scheduledTimerWithTimeInterval:0.1 Target:self selector:@selector(mymethod) userInfo:nil repeat:YES];
10-14-2010, 01:55 AM
#4 (permalink )
Registered Member
Join Date: Jul 2010
Posts: 72
Hi
Quote:
Originally Posted by
Kalimba
You've got the method name spelled two different ways in your post. Which spelling is actually used in your source code?
.
myTimer=[NSTimer scheduledTimerWithTimeInterval:0.1 Target:self selector:@selector(mymethod) userInfo:nil repeat:YES];
10-14-2010, 02:22 AM
#5 (permalink )
Pro. Game Developer
iPhone Dev SDK Supporter
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,176
Quote:
Originally Posted by
santosh_kumar
.
myTimer=[NSTimer scheduledTimerWithTimeInterval:0.1 Target:self selector:@selector(mymethod) userInfo:nil repeat:YES];
Look at the documentation for the NSTimer class and see how the method name you're trying to call differs in the docs, compared to the code in your source.
10-14-2010, 06:03 AM
#6 (permalink )
Registered Member
Join Date: Jul 2010
Posts: 72
I got it
Quote:
Originally Posted by
Kalimba
Look at the documentation for the NSTimer class and see how the method name you're trying to call differs in the docs, compared to the code in your source.
There was a typing mistake, i typed 'T' instead of 't' in 'target:'
myTimer=[NSTimer scheduledTimerWithTimeInterval:0.1
Target :self selector:@selector(mymethod) userInfo:nil repeat:YES];
corrected:
myTimer=[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(mymethod) userInfo:nil repeat:YES];
Refer :
http://stackoverflow.com/questions/1...-i-use-nstimer
Last edited by santosh_kumar; 10-14-2010 at 06:06 AM .
10-14-2010, 08:49 AM
#7 (permalink )
Pro. Game Developer
iPhone Dev SDK Supporter
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,176
Quote:
Originally Posted by
santosh_kumar
There was a typing mistake, i typed 'T' instead of 't' in 'target:'
myTimer=[NSTimer scheduledTimerWithTimeInterval:0.1
Target :self selector:@selector(mymethod) userInfo:nil repeat:YES];
corrected:
myTimer=[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(mymethod) userInfo:nil repeat:YES];
Refer :
How do I use NSTimer - Stack Overflow
If the "corrected" version above is what you are currently using in your code, I'd say you still have a typo that needs to be addressed.
10-14-2010, 09:19 AM
#8 (permalink )
Registered Member
Join Date: Jul 2010
Posts: 72
Quote:
Originally Posted by
Kalimba
If the "corrected" version above is what you are currently using in your code, I'd say you still have a typo that needs to be addressed.
your welcome to address the typo mistakes.
10-14-2010, 09:23 AM
#9 (permalink )
Registered Member
Join Date: May 2010
Posts: 577
Quote:
Originally Posted by
santosh_kumar
your welcome to address the typo mistakes.
myTimer=[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(mymethod) userInfo:nil
repeat:YES];
Look within the bolded statement.
10-14-2010, 09:30 AM
#10 (permalink )
Registered Member
Join Date: Jul 2010
Posts: 72
Quote:
Originally Posted by
Speed
myTimer=[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(mymethod) userInfo:nil repeat:YES];
Look within the bolded statement.
ohk i overlooked 's' in
[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(mymethod) userInfo:nil repeat
s :YES];
am i right? but it is working properly, Can u give explanation Kalimba?
10-14-2010, 09:31 AM
#11 (permalink )
Pro. Game Developer
iPhone Dev SDK Supporter
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,176
Quote:
Originally Posted by
santosh_kumar
your welcome to address the typo mistakes.
I could do that, but you'd be missing a learning opportunity.
10-14-2010, 09:34 AM
#12 (permalink )
Registered Member
Join Date: Jul 2010
Posts: 72
Quote:
Originally Posted by
Kalimba
I could do that, but you'd be missing a learning opportunity.
Heh thanks
but it is working properly, what can you say about that?
10-14-2010, 09:39 AM
#13 (permalink )
Registered Member
Join Date: Jul 2010
Posts: 72
Quote:
Originally Posted by
Kalimba
I could do that, but you'd be missing a learning opportunity.
there is no typing mistake in source.
Sorry
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
» Advertisements
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,895
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38