• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: subclass says "unrecognized selector"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: subclass says "unrecognized selector"
      • From: claw <email@hidden>
References: 
 >subclass says "unrecognized selector" (From: Mikkel Eide Eriksen <email@hidden>)
 >Re: subclass says "unrecognized selector" (From: claw <email@hidden>)

  • Prev by Date: Re: subclass says "unrecognized selector"
  • Next by Date: Re: subclass says "unrecognized selector"
  • Previous by thread: Re: subclass says "unrecognized selector"
  • Next by thread: Re: subclass says "unrecognized selector"
  • Index(es):
    • Date
    • Thread