• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSArrayController and avoidsEmptySelection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: [moderator] Re: About Posting [ end of this thread ]
  • Next by Date: NSPersistentDocument Save As failure
  • Previous by thread: Re: NSArrayController and avoidsEmptySelection
  • Next by thread: Drag&Drop to desktop - file icons layout problem
  • Index(es):
    • Date
    • Thread