FROM : Marco Scheurer
DATE : Tue Apr 26 23:09:56 2005
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
DATE : Tue Apr 26 23:09:56 2005
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
| Related mails | Author | Date |
|---|---|---|
| Todd Ransom | Apr 26, 20:28 | |
| Marco Scheurer | Apr 26, 22:05 | |
| Todd Ransom | Apr 26, 22:20 | |
| Ondra Cada | Apr 26, 22:32 | |
| Greg Titus | Apr 26, 22:57 | |
| Marco Scheurer | Apr 26, 23:09 | |
| Todd Ransom | Apr 26, 23:17 | |
| Marco Scheurer | Apr 26, 23:45 | |
| Ondra Cada | Apr 26, 23:54 | |
| glenn andreas | Apr 26, 23:57 | |
| Todd Blanchard | Apr 27, 00:22 | |
| Todd Ransom | Apr 27, 00:30 | |
| Ondra Cada | Apr 27, 00:36 | |
| Todd Ransom | Apr 27, 00:38 | |
| Marco Scheurer | Apr 27, 01:03 | |
| Dan Treiman | Apr 27, 01:40 | |
| Ondra Cada | Apr 27, 01:47 |






Cocoa mail archive

