Re: How to get a Category method?
Re: How to get a Category method?
- Subject: Re: How to get a Category method?
- From: Rosyna <email@hidden>
- Date: Sun, 14 Mar 2004 17:17:41 -0700
Try the same thing with an instance method, not a class method.
Ack, at 3/15/04, Ondra Cada said:
On Monday, Mar 15, 2004, at 00:22 Europe/Prague, Rosyna wrote:
Neither class_getInstanceMethod nor respondsToSelector: says the
class responds to the selector even though it does (via a category).
You sure?
18 /tmp> > q.m
#import <Foundation/Foundation.h>
int main() {
[NSAutoreleasePool new];
NSLog(@"responds: %d",[NSString
respondsToSelector:NSSelectorFromString(@"justATest")]);
return 0;
}
@implementation NSString (JustATest)
+(void)justATest {}
@end
19 /tmp> cc -Wall -framework Foundation q.m && ./a.out
2004-03-15 00:44:32.371 a.out[23735] responds: 1
20 /tmp>
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
_______________________________________________
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.