Re: "current" selector as string
Re: "current" selector as string
- Subject: Re: "current" selector as string
- From: Clark Cox <email@hidden>
- Date: Thu, 24 Jul 2003 19:11:28 -0400
On Thursday, July 24, 2003, at 16:05, Prachi Gauriar wrote:
On Thursday, July 24, 2003, at 6:09 AM, Sailor Quasar wrote:
On Thursday, July 24, 2003, at 04:08 PM, Thomas Deniau wrote:
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....
current SEL : _cmd
so as string : NSStringFromSelector(_cmd);
i.e. for example NSLog(@"The error occured in -[%@
%@]",NSStringFromClass(isa),NSStringFromSelector(_cmd));
Hmm... Does anyone know how to know if it's + or - automatically ?
[self isKindOfClass:[Class class]] would answer that, I would think
I tried this and I get the error "`Class' is not an Objective-C class
name or alias". Is this a bug? I would think that you should be able
to send a message to Class, but that doesn't seem to be the case (in
Xcode and Panther preview). Anyone else having this problem? I
haven't got around to installing Jaguar again, so I haven't tested on
that.
No, Class is nothing more than a typedef. This makes no more sense than
sending messages to id, or NSObject*:
[id someMethod]
[NSObject* someMethod]
_______________________________________________
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.