• 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?[3]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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

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