Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
December 16, 2017, 05:46:22 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: selectors  (Read 1395 times)
scokar
Newbie
*
Posts: 10


« on: February 07, 2011, 04:33:25 PM »

Is it possible to set the value of a selector at run time?

"pseudocode:"

Code: (Objective-C)
(void) performRandomAction: (id) myObject andmethod: (id) myMethod
{
SEL action;
action=@selector(myMethod)

[myObject performSelector: action];
}


This will not work since "@selector" is compile time only.

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 classroomM.com. All rights reserved.