Skip navigation.
 
mlInserting a custom class into class hierarchy?
FROM : Alex Majora
DATE : Fri Dec 03 19:33:26 2004

I am on a very large project, so I've established a common custom class,
MyObject, inserted beneath NSObject for all of our objects that inherit
directly from NSObject; In this way, we can add all of our common
functionality and instance variables there, so there's no duplication
amongst the various classes.

So far so good.

However, for objects that necessarily must subclass from GUI elements like
NSImageView, NSQuickDrawView, etc., I don't see a way to do this.

In general, I'm not a fan of multiple inheritance, but it would be handy in
this case. Simply adding a category to NSObject doesn't allow us to add
instance variables, so that's out. I don't see any way to "insert" a custom
class into an established hierarchy. And I certainly don't want to replace
NSObject, for obvious reasons. Any ideas?

Thanks!
Alex

Related mailsAuthorDate
mlInserting a custom class into class hierarchy? Alex Majora Dec 3, 19:33
mlRe: Inserting a custom class into class hierarchy? j o a r Dec 3, 20:44
mlRe: Inserting a custom class into class hierarchy? Jim Thomason Dec 3, 21:01
mlRe: Inserting a custom class into class hierarchy? Ken Anderson Dec 3, 21:07
mlRe: Inserting a custom class into class hierarchy? Jim Thomason Dec 3, 23:17
mlRe: Inserting a custom class into class hierarchy? Ken Anderson Dec 3, 23:59
mlRe: Inserting a custom class into class hierarchy? Shaun Wexler Dec 4, 00:11
mlRe: Inserting a custom class into class hierarchy? Shaun Wexler Dec 4, 00:12
mlRe: Inserting a custom class into class hierarchy? The Karl Adam Dec 4, 00:38
mlRe: Inserting a custom class into class hierarchy? M. Uli Kusterer Dec 4, 08:58
mlRe: Inserting a custom class into class hierarchy? Shaun Wexler Dec 5, 01:49