Re: "Multiple Inheritance" between NSTableView and NSOutlineView
Re: "Multiple Inheritance" between NSTableView and NSOutlineView
- Subject: Re: "Multiple Inheritance" between NSTableView and NSOutlineView
- From: "Adam R. Maxwell" <email@hidden>
- Date: Mon, 3 Jul 2006 19:53:55 -0700
On Jul 3, 2006, at 19:26, Jerry Krinock wrote:
I have in my app:
XXTableView, a subclass of NSTableView
XXOutlineView, a subclass of NSOutlineView.
I just wrote a group of methods, with identical implementations
that I would
like to add to both XXTableView and XXOutlineView, without
duplicating them.
It seems there should be a way to do this, but I can't see it.
A category? No, because categories can only be added to one class.
Are you sure? I think you can use a category on NSTableView, and
NSOutlineView will inherit that implementation. Take a look at
NSArray.h, where the NSArrayCreation category is inherited by
NSMutableArray, for instance.
Adam
_______________________________________________
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