• 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: "Multiple Inheritance" between NSTableView and NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: "Multiple Inheritance" between NSTableView and NSOutlineView
      • From: Jerry Krinock <email@hidden>
References: 
 >"Multiple Inheritance" between NSTableView and NSOutlineView (From: Jerry Krinock <email@hidden>)

  • Prev by Date: "Multiple Inheritance" between NSTableView and NSOutlineView
  • Next by Date: Re: "Multiple Inheritance" between NSTableView and NSOutlineView
  • Previous by thread: "Multiple Inheritance" between NSTableView and NSOutlineView
  • Next by thread: Re: "Multiple Inheritance" between NSTableView and NSOutlineView
  • Index(es):
    • Date
    • Thread