I believe for icon-type views, the idea that shift-selecting selects a range of items is no longer considered best practice these days. For example, the icon view in the Finder doesn't do that (list view does).
command-click and shift-click are the same thing for icon views, i.e. they toggle the clicked item. --Graham On 09/07/2012, at 5:34 PM, Robert Monaghan wrote: > 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. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com