Re: Editing NSOutlineView Group Item
Re: Editing NSOutlineView Group Item
- Subject: Re: Editing NSOutlineView Group Item
- From: Quincey Morris <email@hidden>
- Date: Mon, 03 Nov 2014 17:55:42 +0000
On Nov 3, 2014, at 04:12 , Luther Baker <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden