• 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: Chris Suter <email@hidden>
  • Date: Sat, 28 Oct 2006 11:45:52 +1000

It's a pointer to a struct objc_selector.

Jump to definition in XCode is helpful for these things.

You want %p to print the pointer value or consider using sel_getName ().

- Chris

On 28/10/2006, at 11:36 AM, 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

The Run log sez:
[Session started at 2006-10-27 16:49:12 -0600.]
2006-10-27 16:49:12.744 canonicalTest[1344] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0x3203, name = 'com.yourcompany.canonicalTest.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2006-10-27 16:49:12.745 canonicalTest[1344] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (com.yourcompany.canonicalTest.ServiceProvider)
canonicalTest has exited due to signal 11 (SIGSEGV).


--Roland Silver <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:
systems.com


This email sent to email@hidden


--
Coriolis Systems Limited is a limited company incorporated in England and Wales
Company No. 5061807 Registered Office: 10 Oxford Street, Southampton, SO14 3DJ



_______________________________________________ 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: Re: What's the type of a selector?
  • Next by Date: Re: What's the type of a selector?
  • Previous by thread: Re: What's the type of a selector?
  • Next by thread: Re: What's the type of a selector?
  • Index(es):
    • Date
    • Thread