Re: Rearranging NSOutlineView via drag-and-drop
Re: Rearranging NSOutlineView via drag-and-drop
- Subject: Re: Rearranging NSOutlineView via drag-and-drop
- From: Quincey Morris <email@hidden>
- Date: Mon, 05 Jan 2015 19:08:25 +0000
On Jan 5, 2015, at 10:48 , Charles Jenkins <email@hidden> wrote:
>
> Well, the view-based outline view calls my delegate to get the view pointer for a given item, and in response my delegate dutifully creates one, sets its text and image, and hands it over.
Creating the cell view and populating the cell view are different things, since NSOutlineView re-uses existing view objects for different rows at different times.
NSOutlineView calls ‘outlineView:viewForTableColumn:item:’ when it needs to associate a view with a cell. It should be doing this for the views in the rows that you explicitly reloaded. (It would be a horrible bug if it didn’t, obviously. Reloading invalidates *everything* the NSOutlineView thinks it knows about the affected cells.)
Thus, it shouldn’t be necessary to *find* the view — you should be doing the reconfiguration in ‘outlineView:viewForTableColumn:item:’.
_______________________________________________
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