Re: Want NSTableView NSOutlineView to load lazy like iOS?
Re: Want NSTableView NSOutlineView to load lazy like iOS?
- Subject: Re: Want NSTableView NSOutlineView to load lazy like iOS?
- From: Jerry Krinock <email@hidden>
- Date: Mon, 15 Sep 2014 13:54:45 -0700
On 2014 Sep 15, at 12:47, Ken Thomases <email@hidden> wrote:
> Check the places where you can control how the outline view sizes the columns.
It seems that I only set column widths during -awakeFromNib. Definitely not upon expanding an item.
> In particular, from the docs for -[NSOutlineViewDelegate outlineView:sizeToFitWidthOfColumn:]:
>
> "By default, NSOutlineView iterates every row in the table, accesses a cell via preparedCellAtColumn:row:, and requests the cellSize to find the appropriate largest width to use.
>
> For accurate results and performance, it is recommended that this method is implemented when using large tables. By default, large tables use a monte carlo simulation instead of iterating every row.”
Those two paragraphs don’t make much sense to me, Ken. For starters, when does NSOutlineView “iterate every row”? I mean, this is a delegate method. There is no default implementation.
Further up, it says that this method is "Invoked to allow the delegate to provide custom sizing behavior when a column’s resize divider is double clicked.” I was never even aware of this “feature" :)) and had not implemented this method. Just to test, I implemented it to return CGFloat value 50.0. And, by golly, now when I double-click a column divider, in the table header, the preceding column resizes to 50 points.
I’m still thinking, but I can’t reckon any connection between this and -outlineView:child:ofItem: being sent proactively instead of lazily. Implementing it did not stop the “let’s get every row” craziness with -outlineView:child:ofItem:.
_______________________________________________
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