Multiple Inheritance (not Marathon Infinity)
Multiple Inheritance (not Marathon Infinity)
- Subject: Multiple Inheritance (not Marathon Infinity)
- From: Rosyna <email@hidden>
- Date: Wed, 5 Dec 2001 17:23:05 -0700
If I have this right, Multiple Inheritance is the ability for a class
to inherit from multiple parent classes that do not necessary inherit
or derive from eachother. Like iostream.h inherits from istream and
ostream. Is this correct?
If this is correct, I present something.
Since Objective C does not support MI, doesn't this cause problems
with things like NSTextField? It's parents (Path: :NSControl :
NSView : NSResponder : NSObject) never inherit from NSText. So,
as a workaround we have a/an -(id)cell method in NSControl which
returns an instance of some NSText child class that has been
initialized. Is this correct?
This seems to lead to some redundantly declared methods in each class
and some confusion about how to access some properties of
NSTextField. Would not this specific "problem" be "fixed" if MI
existed in Objective-C?
A similar case can be made for some other classes. But I think
NSTextField illustrates it best.
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insane People