Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Outline view selection doesn't move when items are inserted?



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.