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

Re: What's the type of a selector?


  • Subject: Re: What's the type of a selector?
  • From: Jim Correia <email@hidden>
  • Date: Fri, 27 Oct 2006 22:11:56 -0400

On Oct 27, 2006, at 9:36 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?
This attempt to find out compiles, but craps out when I try to run it, in an asm called objc_msgSend_rtp:


- (void)foo {
    NSLog(@"%@", @selector(foo));
} //end foo

A selector is a SEL, which is typed as

typedef struct objc_selector 	*SEL;

To log one you write

NSLog(@"%@", NSStringFromSelector(aSelector));

Jim
_______________________________________________
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


References: 
 >What's the type of a selector? (From: Roland Silver <email@hidden>)

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