- (NSMethodSignature *) methodSignatureForSelector:(SEL)selector {
- fprintf(stderr, "[%s]S-%s\n", self->isa->name, sel_getName(selector));
+ fprintf(stderr, "[%s]S-%s\n", class_getName(self->isa), sel_getName(selector));
return [super methodSignatureForSelector:selector];
}
- (BOOL) respondsToSelector:(SEL)selector {
- fprintf(stderr, "[%s]R-%s\n", self->isa->name, sel_getName(selector));
- return [super respondsToSelector:selector];
+ BOOL responds = [super respondsToSelector:selector];
+ fprintf(stderr, "[%s]R%c%s\n", class_getName(self->isa), (responds ? '+' : '-'), sel_getName(selector));
+ return responds;
}