Re: New Cocoa Programmer
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)