I add another Object to my NSOutlineView‘s NSOutlineViewDataSource and call [myOutlineView noteNumberOfRowsChanged]. If I read the documentation correctly this should get the OutlineView to realize I added one row and redraw itself properly. But instead nothing happens.
If I call [myOutlineView reloadData] it works, but according to the documentation reloadData has a much higher overhead than noteNumberOfRowsChanged (since it reloads all data … duh)
I’m not using bindings, I supply NSOutlineViewDataSource myself.
Anyone know what I’m doing wrong?
From the
reloadData:documentation:To me that sounds like thatnoteHeightOfRowsWithIndexesChanged:only ensures that the newly added object is visible within the view.The discussion section of the
reloadData:documentation also mentions a way to update a single row. But it seems thatreloadData:is the only option if you add new objects.