On Oct 22, 2009, at 9:01 AM, Jens Alfke <j...@mooseyard.com> wrote:
This statement is true; however those integers happen to be the
memory addresses of unique instances of the strings*. This makes it
very efficient for the runtime to convert a selector to an NSString,
and vice versa, and also helps with debugging (in gdb you can just
type "print (char*)sel" to inspect a selector.)
Don't forget NSStringFromSelector, which I find is usually more
convenient and doesn't rely on implementation details. Invoke it in
GDB by casting its return value to id:
po (id)NSStringFromSelector(_cmd)
(Although I have noticed that gdb is much better about inferring when
it can expect an object return value from a function/method call).
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com