So I'm working on adding another component to my app that uses NSOutlineView, as we do in AppKit.
There will probably always be less than 25 rows here. One row is much larger than the others. Not sure if any of this matters.
What I know is I noticed scrolling it is very jank. It's going way too fast. So I took a peek and see lineScroll is getting is 304 in Interface Builder. Not sure how that happened. I changed it to like 24. Then Interface Builder automatically changes it back to 304.
So in -viewDidLoad I just set it:
NSScrollView *scrollView = self.outlineView.enclosingScrollView;
scrollView.verticalLineScroll = 24.0;
scrollView.lineScroll = 24.0;
But scrolling still is busted. So I subclass NSScrollView and override the setters.
For some reason, NSTableView's -tile method is deciding to change the lineScroll to 304, all on its own.
So every time tile is called. line scrolls get reset to 304.
Err so 304 is the design time height of the first row I have in Interface Builder. And for some reason NSTableView tries to force that as the line scroll from within -tile.
All my other rows are not that big. I guess I can reorder the rows in the xib, or just keep calling super with my own value.
Edit: Also changing "Row sizing style" from "Match Canvas" to "Custom" allows me to change the row height to whatever I want.
NSTableView apparently forces the value of row height as the scrollView's lineScroll. Does it need to be reset in every -tile call? I'm not sure. But I'm implementing heightOfRowByItem: so just setting the row height in the xib is the way to set line scroll without actually changing the height of the rows (which are not all the same)