• 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
Where to noteHeightOfRowsWithIndexesChanged
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Where to noteHeightOfRowsWithIndexesChanged


  • Subject: Where to noteHeightOfRowsWithIndexesChanged
  • From: Tony P <email@hidden>
  • Date: Tue, 15 Jun 2010 12:26:59 +0100

Where's the best place to put noteHeightOfRowsWithIndexesChanged to keep a tableview display correct whilst scrolling?

The tableview has variable height rows, and because of a relatively slow data source, resizing and user control of fonts, etc, I don't know the row height in advance. I'm caching the row height, and returning a single-line height if the row is not visible (and the height is not yet known). If the row is visible I calculate the actual height and return that (via the NSTableView heightOfRow delegate).

This almost works, but I've not found a good place to put noteHeightOfRowsWithIndexesChanged. I get either overlapping rows or some blank rows during scroll. I've tried NSViewBoundsDidChangeNotification. I've even tried putting it in the heightOfRow delegate (which I know must be wrong), with some re- entrancy control which has given the best results so far (but still displays blank rows sometimes). There are usually about 200,000 rows, so calculating the actual height for all rows is not an option (since it takes about 19 seconds).

Any ideas anyone?

Tony
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Where to noteHeightOfRowsWithIndexesChanged
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: Notification when network volume disappears
  • Next by Date: Re: Custom NSCell mouse events
  • Previous by thread: Re: [UPDATE] Applications using RegexKitLite no longer being accepted at the AppStore
  • Next by thread: Re: Where to noteHeightOfRowsWithIndexesChanged
  • Index(es):
    • Date
    • Thread