Re: SELs in arrays
Re: SELs in arrays
- Subject: Re: SELs in arrays
- From: Andreas Monitzer <email@hidden>
- Date: Wed, 26 Sep 2001 00:22:48 +0200
On Tuesday, September 25, 2001, at 10:06 , Greg Titus wrote:
Using +numberWithInt: and -intValue will work, but it seems to me like
it'd be better style, more readable, doesn't have to be revisited if we
ever go to 64-bit pointers, et cetera, if you write this instead:
[array addObject:[NSValue valueWithPointer:@selector(whatever)]];
...
[anObject performSelector:[[array objectAtIndex:n] pointerValue]];
I generally agree with you (better style, more readable), however, in the
case this app will be compiled for a 64 bit processor (G5 anyone?), ints
will be 64bits, too (according to my K&R-book).
andy
--
Description forthcoming.