Re: "current" selector as string
Re: "current" selector as string
- Subject: Re: "current" selector as string
- From: Fritz Anderson <email@hidden>
- Date: Thu, 24 Jul 2003 10:10:13 -0500
To supplement the other answers (_cmd is the right way to communicate
with the runtime), GCC provides __FUNCTION__ and __PRETTY_FUNCTION__ as
counterparts to __LINE__ and __FILE__. They're C strings suitable for
debugging, and __PRETTY_FUNCTION__ shows Objective-C methods as
+/-[Classname method:name:].
-- F
On Thursday, 24 July 2003, at 5:28 AM, Michael Monscheuer wrote:
What I do:
I'm working on an error tracker.
My Question is:
how to find out the SEL of the current method during runtime.
Some description:
It is no problem to find out the current line and file (by
preprocessors' __LINE__ and __FILE__) and the current class (by
NSStringFromClass([self class]).
But now I want to find out the name of the method the error occured in
by using its SEL. So what I'd need is some kind of function to find
out the current SEL....
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.