Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-19-2009, 03:28 PM   #3 (permalink)
LunarMoon
see my iOS apps! :D
 
Join Date: Sep 2008
Location: Europe
Posts: 296
LunarMoon is on a distinguished road
Default

Quote:
Originally Posted by SkylarEC View Post
SEL yourVariable = @selector(yourSelector;
Thanks, but I am not sure if I understood that...

My string variable is formed like this...

Code:
// according to x value we will have m1, m2 or m3 as string.
NSString * methodName = [NSString stringWithFormat:@"m%@", x ];

SEL myMethod = @selector(methodName);

// then what?

NSTimer *myTimer = [[NSTimer scheduledTimerWithTimeInterval:0.5
	  target:self		selector:myMethod
	userInfo:nil	repeats:NO]		retain];
	[myTimer release];
???? this do not seems to work.
I am receiving an error message telling me that methodName variable is not being used...
LunarMoon is offline   Reply With Quote
 

» Advertisements
» Online Users: 435
20 members and 415 guests
7twenty7, ArthurOff, baja_yu, BdR, BumChinBooth, dansparrow, Duncan C, falco1973, GraffitiCircus, ioani, jeroenkeij, n00b, nyoe, QuantumDoja, rraagg, teebee74, TheStalker, TheTakeOver, WeaselPig, xerohuang
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,634
Threads: 94,093
Posts: 402,792
Top Poster: BrianSlick (7,990)
Welcome to our newest member, nyoe
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:53 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.