Re: (RS)What's the type of a selector?[3]
Re: (RS)What's the type of a selector?[3]
- Subject: Re: (RS)What's the type of a selector?[3]
- From: Klaus Backert <email@hidden>
- Date: Sat, 28 Oct 2006 06:11:12 +0200
Am 28.10.2006 um 05:05 schrieb Roland Silver:
On Oct 27, 2006, at 8:30 PM, Chris Suter wrote:
Hi,
Looks like you should read some C books.
It's a pointer to an structure.
It's not a char * and NSLog ("%s", @selector (foo)) will not work
as someone suggested earlier.
Either use %p for a pointer or use %s with sel_getName or use %@
and NSStringFromSelector.
This is all in the documentation and you really don't need us to
help you.
- Chris
Well, Chris...
Aaron Hillegass writes in the 2nd Edition of his Cocoa Programming
for Mac OS X in Chapter 3 "Objective-C / For the More Curious: How
Does Messageing Work?", p78f:
"The selector is of type SEL. Although, SEL is actually defined to be
char * ...".
With Cmd-doubleclick on any SEL in Xcode I find immediately:
typedef struct objc-selector *SEL
in the header objc.h
There is a little bit more info in the Objective-C runtime reference.
Cheers.
Klaus
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden