• 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: Ondra Cada <email@hidden>
  • Date: Tue, 25 Sep 2001 21:13:30 +0200

John,

>>>>>> John C. Randolph (JCR) wrote at Tue, 25 Sep 2001 12:05:19 -0700:
JCR> >JCR> This won't work, since on Mac OS X and NEXTSTEP, selectors aren't
JCR> >JCR> integers, but uniqued C strings:
JCR> >
JCR> >This *will* work, since in any ObjC implementation selectors are
JCR> >convertible
JCR> >to int. In NeXT (and therefore Apple) ObjC they are just pointers --
JCR> >which
JCR> >is a type convertible to int all right.
JCR>
JCR> I stand corrected. I didn't think it through.

Nevertheless, storing them as strings _HAS_ advantages, _if you don't mind
the performance loss_. Assigning the selector numbers (addresses) is somewhat
a magic(*), whilst message names are quite unequivocal: they can be freely
stored and used later, or sent through DO, or whatever.

(*) I regret to say I even don't fully understand the mechanism which is
used to unique selectors during dynamic loading. Well, it does work, that's
important ;)))
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: SELs in arrays
      • From: John Hörnkvist <email@hidden>
References: 
 >Re: SELs in arrays (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: SELs in arrays
  • Next by Date: examining keyboard state ?
  • Previous by thread: Re: SELs in arrays
  • Next by thread: Re: SELs in arrays
  • Index(es):
    • Date
    • Thread