• 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: Subclassing NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing NSTableView


  • Subject: Re: Subclassing NSTableView
  • From: Ondra Cada <email@hidden>
  • Date: Fri, 26 Oct 2001 12:14:40 +0100

Drew,

>>>>>> Drew McCormack (DMC) wrote at Fri, 26 Oct 2001 09:43:39 +0200:
DMC> >Just imagine a table of 50.000 rows, the vertical scroller somewhere in
DMC> >the middle. Given the current design (assuming that all rows do have
DMC> >the same
DMC> >height), this is no problem at all. With different row heights this
DMC> >would be
DMC> >a huge performance problem.
...
DMC> I suspect that the rowsInRect: method would be used to determine which
DMC> rows to draw. Does anyone else know if this is right?

Yep, it's not right.

Forget the particular API and tell me: if one clicks into the middle area of
the scroller, how would the tableview determine which rows to show?

Unless _all_ (ar at least all to the clicked point) row heights are fetched
(which would be the aforementioned "huge performance problem"), there is no
way to guess whether, say, first 1000 rows happen to be much higher than the
rest and so the "middle" happens to be somewhere around row #900, or whether
the last 1000 happens to be much higher, so the "middle" happens to be
somewhere around #49100.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: Subclassing NSTableView
      • From: Drew McCormack <email@hidden>
References: 
 >Re: Subclassing NSTableView (From: Drew McCormack <email@hidden>)

  • Prev by Date: Re: Subclassing NSTableView
  • Next by Date: Re: Settings text in an NSScrollView
  • Previous by thread: Re: Subclassing NSTableView
  • Next by thread: Re: Subclassing NSTableView
  • Index(es):
    • Date
    • Thread