• 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: New Cocoa Programmer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New Cocoa Programmer


  • Subject: Re: New Cocoa Programmer
  • From: Rainer Brockerhoff <email@hidden>
  • Date: Mon, 12 Nov 2001 21:31:52 -0200

>From: Ondra Cada <email@hidden>
>Date: Mon, 12 Nov 2001 18:23:11 +0100
>If it is *not* the case, might you perhaps know why the following code is
>uncompilable?
>
>... switch (x) { case @selector(xyz): ... }
>
>That should be (from the compiler's prespective) a pretty equivalent
>situation as using class names there, or do I understand it improperly?

I would hazard a guess here; for the same reason that
char* string;
switch (string) {
case "abc":
...
case "xyz":
...
}
won't work. Aren't selectors and such ultimately implemented as (possibly mangled) strings?


--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)


  • Follow-Ups:
    • Re: New Cocoa Programmer
      • From: Louis Demers <email@hidden>
  • Prev by Date: Re: bad documentation
  • Next by Date: Re: New Cocoa Programmer
  • Previous by thread: Re: New Cocoa Programmer
  • Next by thread: Re: New Cocoa Programmer
  • Index(es):
    • Date
    • Thread