• 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: Outline and Table back to front
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outline and Table back to front


  • Subject: Re: Outline and Table back to front
  • From: Thomas Davie <email@hidden>
  • Date: Mon, 20 Jun 2005 21:22:40 +0100


On Jun 20, 2005, at 9:15 PM, Ben Kazez wrote:

From a technical standpoint, the inheritance could go either way -- NSTableView is a specialized NSOutlineView, or vice versa. The choice should be made based on what makes most sense from an implementation standpoint. Look at the two options:

- NSTableView is a specialized NSOutlineView. (This means NSTableView is a subclass of NSOutlineView.) With this way of thinking, an NSTableView is an NSOutlineView that cannot display outline data.

- NSOutlineView is a specialized NSTableView. (This means NSOutlineView is a subclass of NSTableView.) With this way of thinking, an NSOutlineView is an NSTableView that can display outline data.

Removing a feature from a class would mean overriding the applicable methods with empty stubs and ignoring member variables. This is wasteful of memory and confuses the user of the subclass, who has to know not to use the methods that are empty. On the other hand, adding a feature to a class is usually a reason given for subclassing. This would explain why NSOutlineView inherits from NSTableView.

In fact, the entire Cocoa inheritance tree works this way. We don't have NSImageViews that are NSViews that are NSImageViews without built-in image-viewing capabilities; to implement this would require tons of multiple inheritance (picture the inheritance tree upside down!).

Fair enough... From another perspective... A different person has told me that NSTableView is there for backwards compatibility reasons... That Apple didn't want to replace it with NSOutlineView because it would have wreaked havok...

Is there any truth behind this?

Bob
 _______________________________________________
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:
    • [Moderator] End Of Thread (Re: Outline and Table back to front)
      • From: mmalcolm crawford <email@hidden>
References: 
 >Re: Outline and Table back to front (From: Ben Kazez <email@hidden>)

  • Prev by Date: Re: Outline and Table back to front
  • Next by Date: Re: Writing a draglet in Cocoa
  • Previous by thread: Re: Outline and Table back to front
  • Next by thread: [Moderator] End Of Thread (Re: Outline and Table back to front)
  • Index(es):
    • Date
    • Thread