NSArrayController and avoidsEmptySelection
NSArrayController and avoidsEmptySelection
- Subject: NSArrayController and avoidsEmptySelection
- From: "Cerino, Carmen" <email@hidden>
- Date: Tue, 28 Jul 2009 08:36:11 -0400
- Acceptlanguage: en-US
- Thread-topic: NSArrayController and avoidsEmptySelection
I have an NSArrayController hooked up to an NSCollectionView. When a
user clicks into the empty space of the NSCollectionView, I would like
it so they do not lose their currently selected items. I would have
thought it should have been as simple as telling the NSArrayController
to avoid empty selections. However, I do not get the desired result
when this property is set. Is there something else that needs to be
setup in order for this to work as expected or is my assumption about
what that property is suppose to do completely wrong?
In order to temporarily achieve the desired effect, I ended up
subclasing NSArrayController and overriding the setSelectionIndexes:
method to ignore index sets with a count of 0. However, this seems
more like a work around than a solution.
Cheers,
Carmen
_______________________________________________
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