Where to noteHeightOfRowsWithIndexesChanged
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