• 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 20:17:31 +0100


On Jun 20, 2005, at 7:47 PM, Andreas Mayer wrote:


Am 20.06.2005 um 20:05 Uhr schrieb Thomas Davie:


No subclass should ever add functionality, because this breaks the "is a" relationsip...


I'm sorry, but this is utter - um... - nonsense.

Subclasses *refine* the descriptions of their superclasses. They always do so by *adding* functionality.

A such refined class usually restricts the set of objects that adheres to the class, because those objects need to be able to understand *more* messages than objects of the superclass.

NSOutlineView being a subclass of NSTableView is a perfect example.

And, of course, an outline view *is* a table view. It has rows and columns. But a table view is *not* an outline view, since it can't collapse it's rows.
okay... Wy last message appears not to be appearing on the list... But there is a flaw in what you are saying.

Something is a specialisation (or refinement as you call it) if it restricts the set of objects that are included - this is what you said.

All objects that organise items in rows and columns are examples of outline views (even those that don't have any branch nodes)
Only those that have no branch nodes are table views


Thus by your own logic, TableView should be a subclass of OutlineView.

Your last statement is flawed, you are saying:
Rectangles are squares because they have four edges
Squares are not rectangles because they don't allow you to have different lenghts of edges.


This is clearly false

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:
    • Re: Outline and Table back to front
      • From: Andreas Mayer <email@hidden>
References: 
 >Re: Outline and Table back to front (From: Gorazd Krosl <email@hidden>)
 >Re: Outline and Table back to front (From: Thomas Davie <email@hidden>)
 >Re: Outline and Table back to front (From: Jesus De Meyer <email@hidden>)
 >Re: Outline and Table back to front (From: Thomas Davie <email@hidden>)
 >Re: Outline and Table back to front (From: Corbin Dunn <email@hidden>)
 >Re: Outline and Table back to front (From: Thomas Davie <email@hidden>)
 >Re: Outline and Table back to front (From: Bill Bumgarner <email@hidden>)
 >Re: Outline and Table back to front (From: Thomas Davie <email@hidden>)
 >Re: Outline and Table back to front (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: Outline and Table back to front
  • Next by Date: Re: Outline and Table back to front
  • Previous by thread: Re: Outline and Table back to front
  • Next by thread: Re: Outline and Table back to front
  • Index(es):
    • Date
    • Thread