• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SELs in arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: SELs in arrays (From: Greg Titus <email@hidden>)

  • Prev by Date: Re: examining keyboard state ?
  • Next by Date: Re: Drag and Drop from an app to the Finder
  • Previous by thread: Re: SELs in arrays
  • Next by thread: Re: SELs in arrays
  • Index(es):
    • Date
    • Thread