I've just noticed that after an NSCollectionView's content property changes, 
its selectionIndexes property doesn't change. So even though the change in 
content means the selected items may now have different indexes, or may no 
longer exist at all, the selectionIndexes still contains the old obsolete 
indexes. This can easily cause crashes in app code, and does in my app, when it 
uses the selectionIndexes to index into the content array and blows up with an 
index-out-of-range.

As far as I can tell, this is an NSCollectionView bug. I'm surprised I didn't 
notice it earlier; it may be a regression in Yosemite. Anyone else notice it? 
(Yeah, I'll file a Radar if it appears to be unknown.)

—Jens
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to