NSOutlineView reloadItem does not work as expected.

Originator:lutherbaker
Number:rdar://18906942 Date Originated:11/07/2014
Status:OPEN Resolved:
Product:OS X Product Version:10.10
Classification:UI/UX Reproducible:YES
 
https://github.com/EffectiveProgramming/LBOutlineViewDemo

Summary:
To reload a row in an NSTableView, the API provides reloadDataForRowIndexes:columnIndexes: . This works just fine but when I use this method on an NSOutlineView, I found that while, for the most part it works, I couldn't reload GROUP or SECTION rows this way (since they have no columns, etc).

So that led me to try the reloadItem: family of methods specific to NSOutlineView. Unfortunately, I cannot get them to work for the specific item I want to reload.

The supplied project demonstrates this problem - the rows reload correctly using the reloadDataForRow approach but do not reload at all when using the reloadItem approach.

Steps to Reproduce:
This projects demonstrates a problem I'm having reloading items in the NSOutlineView.

To test the app -

1. Open and Run the app in Xcode

2. The app should open up - it is a simple, full screen NSOutlineView

3.  Alternate tapping on the different rows.

4. Every time a different row is tapped, the displayed value should increment.

5. Visit LBOutlineViewModel and note the reloadSelectedIssue method. In that method are two ways of reloading items. The 'working' method uses reloadDataForRowIndexes:columnIndexes: - but I can't seem to get [_outlineView reloadItem:_selectedItem reloadChildren:YES] to work.

6. Comment the 'reloadData' lines out and uncomment either of the 'reloadItem' lines to test the item approach and note that neither of them work.

Expected Results:
The NSOutlineView's reloadItem family of method calls should reload rows immediately, just like the NSTableView's reloadDataForRow family of calls.

Actual Results:
The NSOutlineView's reloadItem does nothing. There is no visible change in behavior.

Version:
OS X Yosemite 10.10

Notes:


Configuration:
n/a

Attachments:
'LBOutlineViewDemo-master.zip' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!