Autolayout in NSTableRowView with NSTextView

I have an NSOutlineView with view based rows.
The row heights vary by content.
On 10.13 calculating row height ourselves broke and the outline view displays very badly.
So on 10.13 we turn on the auto row height calculation, which solves the problem but creates another.
For one row type I need to use an NSTextView in order to get complex display and clickable links.
However, the NSTextView comes with scrollers and a clip view. I can't get the autolayout to properly calculate the height of the NSTextView so that it doesnt' need to scroll.
Is there a solution to this problem?

Accepted Reply

That is an interesting idea. The documentation for auto height calculation says that my calculated height for the row will be ignored except to calculate for the NSOutlineView's scroll bar, so I'm not sure it will work. But I'll give it a go.

Replies

To be precise, on 10.13 without auto row heights turned on reloading the table view causes the drawn row heights to increase, even though we return the same value for the row heights when asked to calculate them. Sometimes the rows don't display at all.

I thgink that for this specific row, you have to compute height yourself, depending on the content.

That is an interesting idea. The documentation for auto height calculation says that my calculated height for the row will be ignored except to calculate for the NSOutlineView's scroll bar, so I'm not sure it will work. But I'll give it a go.

I subclassed the NSScrollView and implemented the intrinsicContentSize, which is probably what you meant, so thanks.