• 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: "Carmen Cerino Jr." <email@hidden>
  • Date: Wed, 29 Jul 2009 08:19:42 -0400

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

  • Follow-Ups:
    • Re: NSArrayController and avoidsEmptySelection
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: Cahnging bgColor of a UIView not working.
  • Next by Date: Re: NSOpenPanel Exception/Bug
  • Previous by thread: Re: Cahnging bgColor of a UIView not working.
  • Next by thread: Re: NSArrayController and avoidsEmptySelection
  • Index(es):
    • Date
    • Thread