Outline view selection doesn't move when items are inserted?
Outline view selection doesn't move when items are inserted?
- Subject: Outline view selection doesn't move when items are inserted?
- From: John Stiles <email@hidden>
- Date: Wed, 16 Jan 2008 19:00:38 -0800
I have an outline view and I've noticed some… interesting behavior.
Imagine there are 5 items (no hierarchy, just a flat list) and I've
selected the first one via -selectRow:byExpandingSelection:.
Next, I modify my data source to insert an item at the very top of the
list, so now there are 6 items. Then I call -reloadData to inform the
outline view that I've changed the data.
Finally, I call -selectedRowIndices and, bizarrely, the first row is
still selected—even though that's the item I just inserted. The item I
selected in the first step should have moved down to the second slot. I
would have assumed that the selection tracks an /item/, and doesn't just
sit on a particular row.
Is this behavior to be expected? Seems kinda weird to me.
_______________________________________________
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