Re: NSOutlineView and reload
Re: NSOutlineView and reload
- Subject: Re: NSOutlineView and reload
- From: Stéphane <email@hidden>
- Date: Tue, 5 Feb 2008 16:21:38 +0100
On Feb 5, 2008, at 3:37 PM, Alexander Cohen wrote:
When using an OutlineView, i've noticed that when i call reloadData
or reloadItem and the new items are before the actual selection in
the outlineView, the selection is not moved along with the selected
item. What's the best way to keep my current selection in sync when
i reload an OutlineView?
The selection is based on the row indexes.
So the only solution (maybe it's managed by bindings) is to:
- keep track of the objects that were selected based on the row indexes
- reloadData
- find the updated row indexes of the objects and update the selection
_______________________________________________
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