• 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: Difference between SEL and const char* when sending a message?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Difference between SEL and const char* when sending a message?


  • Subject: Re: Difference between SEL and const char* when sending a message?
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Wed, 8 Apr 2009 15:41:51 +0200

I remember I read that somewhere in an Apple document, but I don't managed to find where, and I don't find any proof of that in the sources.


Le 8 avr. 09 à 15:26, Julien Jalon a écrit :

64bit runtime selectors are not char* as far as I know.
In general, you should use NSSelectorFromString/NSStringFromSelector the
more low-level objc functions.


On Wed, Apr 8, 2009 at 9:21 AM, Sherm Pendley <email@hidden>wrote:

On Wed, Apr 8, 2009 at 3:17 AM, Mark Ritchie <email@hidden> wrote:


"You can not simply cast a C string to SEL." is from:


http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/ObjCRuntimeRef.pdf

Note that while it's be convenient to cast SEL to char *, especially when
debugging in gdb, there's no guarantee it will be that way in the future.


In fact, in the Cocotron libobjc, and I believe in the GNU libobjc as well,
it's not that way in the present. :-)


sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Difference between SEL and const char* when sending a message? (From: Daqi Pei <email@hidden>)
 >Re: Difference between SEL and const char* when sending a message? (From: Mark Ritchie <email@hidden>)
 >Re: Difference between SEL and const char* when sending a message? (From: Sherm Pendley <email@hidden>)
 >Re: Difference between SEL and const char* when sending a message? (From: Julien Jalon <email@hidden>)

  • Prev by Date: Re: Difference between SEL and const char* when sending a message?
  • Next by Date: Re: Programatically creating NSMenu?
  • Previous by thread: Re: Difference between SEL and const char* when sending a message?
  • Next by thread: Re: Difference between SEL and const char* when sending a message?
  • Index(es):
    • Date
    • Thread