• 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: Subclassing Catch-22
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing Catch-22


  • Subject: Re: Subclassing Catch-22
  • From: Marco Scheurer <email@hidden>
  • Date: Tue, 26 Apr 2005 23:09:56 +0200


On Apr 26, 2005, at 22:20, Todd Ransom wrote:

I never said it was a problem or a bug in Cocoa. I know this is how it's supposed to work.

I'm sorry, but I thought that what you were missing:

I feel like I am missing some simple rule for safely subclassing that would prevent this problem.

was just the basics of how super is supposed to work. The question does not really make sense otherwise.


I am asking if anyone knows of a pattern or method that would help me avoid this type of situation.

Without knowing more about what results you were expecting, it's hard to be more specific "bad design", or "read the doc". None is very helpful if you already read and understood the doc, but that was not obvious from your question.


You said:

In my subclass I would like doSomething to call super for a subset of possible actions. But when I call super it calls [self getInformationRequiredToDoSomething] and returns its own info, not super's.

There's no super's getInformation if there's no [super getInformation] written somewhere in your code. Maybe that's what you need, maybe, more likely, you need another method, it's hard to tell.


marco


Marco Scheurer Sen:te, Lausanne, Switzerland http://www.sente.ch

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Subclassing Catch-22 (From: Todd Ransom <email@hidden>)
 >Re: Subclassing Catch-22 (From: Marco Scheurer <email@hidden>)
 >Re: Subclassing Catch-22 (From: Todd Ransom <email@hidden>)

  • Prev by Date: Re: NSFileModificationDate after 2039
  • Next by Date: Re: Subclassing Catch-22
  • Previous by thread: Re: Subclassing Catch-22
  • Next by thread: How can a view know when its superview changes sizes?
  • Index(es):
    • Date
    • Thread