Re: Rearranging NSOutlineView via drag-and-drop
Re: Rearranging NSOutlineView via drag-and-drop
- Subject: Re: Rearranging NSOutlineView via drag-and-drop
- From: Roland King <email@hidden>
- Date: Sun, 04 Jan 2015 21:39:02 +0800
> On 4 Jan 2015, at 21:33, Ken Thomases <email@hidden> wrote:
>
> On Jan 4, 2015, at 7:22 AM, Charles Jenkins <email@hidden> wrote:
>
>> moveItemAtIndex:… does indeed move the items around to the proper places in the tree, but the outline view control doesn’t update disclosure triangles. Meaning, if I drag an item’s only child someplace else, the now-childless parent keeps its useless disclosure triangle. Worse, if I drop a new child onto an item that formerly did not have children, the needed disclosure triangle doesn’t appear, and then there’s no way in that session to manipulate the child item again.
>
> Did you call -moveItemAtIndex:… after making changes to your model such that the data source provides the new values from -outlineView:isItemExpandable: and -outlineView:numberOfChildrenOfItem:?
>
I did when I did this very recently - didn’t help - and I just checked the code again to make sure, I had to reload the parent row to get it to call the isItemExpandable and other methods to either show a new disclosure triangle or remove one which was no-longer valid.
_______________________________________________
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