Re: NSOutlineView and reload
Re: NSOutlineView and reload
- Subject: Re: NSOutlineView and reload
- From: John Stiles <email@hidden>
- Date: Tue, 05 Feb 2008 09:36:37 -0800
I've had the same problem as you, but I had pretty good success with
deselecting the items and reselecting them after a reloadData call.
reloadItem calls might be deferred—not sure—but reloadData definitely is
not deferred. It should happen immediately.
Alexander Cohen wrote:
This is what i though and im trying to do it, but after i call reload
data, the view does not seem to get the new row count right away, it
seems to wait until a refresh or something.
AC
On 5-Feb-08, at 10:21 AM, Stéphane wrote:
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
_______________________________________________
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
_______________________________________________
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