Alex Rivera | Logout

Objective-C and use of SEL/IMP

Asked 2010-04-16T02:25:48.977
25

Another question of mine about optimizing Objective C programs inspired the following: does anyone have a short example using SEL and IMP when theMethod has two (or more) integers for input?

Edit
Report

1 Answer

2

Now that I have this working thanks to eman, I can add yet another example:

SEL cardSelector=@selector(getRankOf:::::::);

IMP rankingMethod=[eval methodForSelector:cardSelector];

rankingMethod(eval, cardSelector, 0, 1, 2, 3, 4, 5, 6);

I don't need this for anything useful, I just needed to satisfy my curiosity! Thank you again.

answered 2010-04-21T11:09:34.717

Your Answer