I was hoping these changes would do it ... but unfortunately, I'm still
getting nothing ....

You'll notice the logging below - I can confirm that the address of and
object *selected* is the exact same address of and object I am *reloading*.
Furthermore, the description logging from outlineViewSelectionDidChange:
prints out the old text and the description logging from
reloadSelectedIssue prints out the new text.

Unfortunately, outlineView:viewForTableColumn: is never invoked.

Thanks for the extended help Quincey,
-Luther


- (BOOL)outlineView:(NSOutlineView *)outlineView
isItemExpandable:(id<PVOutlineViewItem>)item {
    return (item == nil);
}

- (void)outlineViewSelectionDidChange:(NSNotification *)notification {
    NSOutlineView *outlineView = notification.object;
    NSInteger selectedRow = outlineView.selectedRow;
    _selectedItem = [outlineView itemAtRow:selectedRow];
    NSLog(@"selected item:(%@)", self.selectedItem);
}

- (void)reloadSelectedIssue {
    NSLog(@"reload selected item: %@", _selectedItem);
    [_outlineView reloadItem:_selectedItem reloadChildren:YES];
}


On Mon, Nov 3, 2014 at 11:55 AM, Quincey Morris <
quinceymor...@rivergatesoftware.com> wrote:

> On Nov 3, 2014, at 04:12 , Luther Baker <lutherba...@gmail.com> wrote:
>
>
> > Or perhaps you are mis-tracking the selected item.
>
> I've double checked what I thought I knew -- but as you imply, who knows
> at this point.
>
>
> You are mis-tracking the selected item, I think. The delegate method
> ‘outlineView:shouldSelectItem:’ doesn’t tell you what *is* selected, nor
> (necessarily) what *will be* selected. All it tells you is that
> NSOutlineView has some reason for asking you whether it *could be* selected.
>
> A better delegate method to track what’s actually selected is
> ‘outlineViewSelectionDidChange:’, and in that method you can ask the
> outline view for the selection.
>
> I think your ‘outlineView:isItemExpandable:’ method is also wrong. You
> should at least return YES when the item is nil.
>
>
>
_______________________________________________

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

Reply via email to