• 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: (RS)What's the type of a selector?[2]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: (RS)What's the type of a selector?[2]
      • From: Uli Kusterer <email@hidden>
    • (RS)What's the type of a selector?[3]
      • From: Roland Silver <email@hidden>
References: 
 >What's the type of a selector? (From: Roland Silver <email@hidden>)
 >Re: What's the type of a selector? (From: John Stiles <email@hidden>)
 >(RS)What's the type of a selector?[2] (From: Roland Silver <email@hidden>)

  • Prev by Date: (RS)What's the type of a selector?[2]
  • Next by Date: KVC and Bindings Question
  • Previous by thread: (RS)What's the type of a selector?[2]
  • Next by thread: (RS)What's the type of a selector?[3]
  • Index(es):
    • Date
    • Thread