• 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
One more try - NSCollectionView multi-selection problem..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

One more try - NSCollectionView multi-selection problem..


  • Subject: One more try - NSCollectionView multi-selection problem..
  • From: Robert Monaghan <email@hidden>
  • Date: Mon, 09 Jul 2012 09:34:53 +0200

Hi Everyone,

In a previous posting, I had a problem with NSCollectionView not selecting a range of objects, when shift-selecting items.
For example, if I were to click on object "3" and then shift-click on object "5", I would expect a range of 3,4,5 to be highlighted.
Instead only 3 and 5 are selected.

Ok, so multi-selection works. Sorta..

(BTW, this same behavior happens with Imagebrowser sample app from Apple.)

I added an observer to my NSArrayController's "selectionIndexes" to see what it think is happening.
Sure enough, the NSArrayController is getting a bunch of ranges that look like this:

<NSIndexSet: 0x100648650>[number of indexes: 2 (in 2 ranges), indexes: (2 4)]

I would have expected something like this:
<NSIndexSet: 0x100362a50>[number of indexes: 3 (in 1 ranges), indexes: (2-4)]

Suggestions?
I see a "setSelectionIndexes:" selector in the NSCollectionView object.
Do I need to do something here? It seems like a huge headache to "teach" NSCollectionView to do a properly shift-selection of a range.

Thanks!

bob.

_______________________________________________

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: One more try - NSCollectionView multi-selection problem..
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: ARC and reinterpret_cast?
  • Next by Date: Re: Stupid block syntax!
  • Previous by thread: Re: Bottom-edge constraint not enforced in IB but is in runtime?
  • Next by thread: Re: One more try - NSCollectionView multi-selection problem..
  • Index(es):
    • Date
    • Thread