On Sep 15, 2014, at 3:54 PM, Jerry Krinock <je...@ieee.org> wrote:

> On 2014 Sep 15, at 12:47, Ken Thomases <k...@codeweavers.com> wrote:
> 
>> 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.

NSOutlineView would iterate every row if the delegate does not implement this 
method and it needs to figure out how wide a column should be.

> 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:.

I had thought that the outline view wanted to know its ideal column width upon 
first showing, but apparently not.

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to