So, before we get to the 'group' question - I seem to be having some difficulty with the item specific API. If I change the call from reloadData to reloadItem ... and if we consider reloading the selected row ... then:
[outlineView reloadItem:selectedObject reloadChildren:YES or NO]; invokes (in order) [outlineView:ov isItemExpandable:selectedItem]; /// return NO, bcs it is a leaf outlineView:ov child:1 ofItem:nil /// return selectedItem ... bcs it is the one we are reloading outlineView:ov isItemExpandable:selectedItem /// NO, bcs it is a leaf done .... nothing happens, no refresh when I instead use outlineView reloadDataForRowIndexes:columnIndexes /// it works [outlineView reloadItem:nil] also works fine the first one invokes [outlineView:ov viewForTableColumn:tableColumn item:selectedItem] straight away ... and therefore works to refresh the display -- while the second way kicks off [outlineView:ov numberOfChildrenOfItem:nil] also working - proceeding through all the rows. Seeing as this is a view based NSOutlineView ... do I need to somehow invalidate the cell view? reloadItem starts the process but it gets cut short somehow -- maybe by a method I don't implement and I'm not breaking on? Other people have had a similar experience ... http://stackoverflow.com/questions/19963031/nsoutlineview-reloaditem-has-no-effect but I'm afraid we must be missing something. As an aside, right now I don't have a deep enough test data set to see if I simply need to load the parent or if I need to reload the entire table .... Thanks, -Luther On Sun, Nov 2, 2014 at 4:42 PM, Luther Baker <lutherba...@gmail.com> wrote: > Indeed ... I was incorrectly using reloadDataForRowIndexes:columnIndexes: > ... and not reloadItem:reloadChildren. > > Thank you, > -Luther > > > On Sun, Nov 2, 2014 at 4:35 PM, Graham Cox <graham....@bigpond.com> wrote: > >> >> On 3 Nov 2014, at 9:18 am, Ken Thomases <k...@codeweavers.com> wrote: >> >> > This is not correct. Group items are items for which the delegate >> returns YES from -outlineView:isGroupItem:. They can have children or not. >> >> >> Yes, my misunderstanding - I've only used group rows for section >> labelling (no children). >> >> > All of the mentions of reloading a _row_ in the above show the >> misunderstanding. >> >> Yup. Though NSOutlineView subclasses NSTableView, the table view methods >> shouldn't be used for reloading where a special outline view method has >> been provided. That would be -reloadItem:reloadChildren: >> >> --Graham >> >> >> > _______________________________________________ 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