Re: (RS)What's the type of a selector?[2]
Re: (RS)What's the type of a selector?[2]
- Subject: Re: (RS)What's the type of a selector?[2]
- From: Chris Suter <email@hidden>
- Date: Sat, 28 Oct 2006 12:30:42 +1000
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
On 28/10/2006, at 12:24 PM, Roland Silver wrote:
On Oct 27, 2006, at 7:45 PM, John Stiles wrote:
objc.h:
typedef struct objc_selector *SEL;
John, the question remains, what do I put in for
%??
in
obj_selector bar = @selector(foo);
NSLog(@"%??", bar);
in other words, what's an obj_selector?
Aaron Hillegass gave me a straight answer to my original question:
-------------------------
It is actually a char *:
- (void)foo {
NSLog(@"%s", @selector(foo));
}
On Oct 27, 2006, at 6:52 PM, Roland Silver wrote:
What's the type of a selector? I gather it's a SEL -- but what's a
SEL, as far as trying to print one using NSLog is concerned?
-------------------------
So I gather that a SEL is merely a char*. Que no?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
systems.com
This email sent to 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