Re: subclass says "unrecognized selector"
Re: subclass says "unrecognized selector"
- Subject: Re: subclass says "unrecognized selector"
- From: Jerry Krinock <email@hidden>
- Date: Sat, 12 Feb 2011 07:19:36 -0800
First of all, I agree with claw that this line looks really weird, although it might work. I've just never seen it done that way.
> if ([self class] == [SuperClass class]) {
Second, are you sure that SubClass inherits from SuperClass? Is it declared like this? …
@interface SubClass : SuperClass
Finally, although this is not your current problem, the following line violates Cocoa Memory Management conventions:
> return [dict copy];
Read this:
http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/MemoryMgmt/MemoryMgmt.html
> I see that it appears to be calling [SubClass tagDict] which is the very method it's already in (so the selector can't very well be unrecognized, or what?)
No, if it did that it would be a recursive method, and possibly an infinite loop.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden