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: Stephen Deken <email@hidden>
- Date: Fri, 27 Oct 2006 23:00:52 -0500
Second: I'm sure there isn't a book on C that talks about @selector
or NSLog, which are Cocoa features, not C features.
Actually, these are Objective C features. Cocoa is a set of classes
built on top of Objective C.
Fourth: It doesn't look to me like @selector is a pointer to a
struct (if that's what you meant), it looks like a pointer-to-char,
i.e. a C-string.
I don't see it defined that way. objc.h:
typedef struct objc_selector *SEL;
If it looks like a char*, that's an implementation detail that you
should not rely on.
Fifth: Thanks for telling me that it's "all in the documentation"
and I don't need the list members to help me. I searched around at
length in the "documentation" before putting my question to the
list, but didn't find the answer anywhere I looked.
<http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/
index.html>
Specifically:
<http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/
Articles/chapter_4_section_6.html>
Specifically:
"Selectors
"For efficiency, full ASCII names are not used as method selectors in
compiled code. Instead, the compiler writes each method name into a
table, then pairs the name with a unique identifier that represents
the method at runtime."
So the fact that right now you can get away with casting them to a
char* does not mean that it won't change in the future.
Finally, something about flies and vinegar versus honey. Please
don't be rude to the people you're asking for help.
Stephen Deken
email@hidden
_______________________________________________
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