The NSIndexSet variants are (soft) deprecated. They will likely be hard deprecated (e.g. produce compiler warnings/errors) in a future release. You should only use the NSIndexPath versions going forward. Using a mix of the two variants of API is not supported. To bind NSCollectionView -selectionIndexPaths to NSArrayController’s -selectionIndexes you will have to set up the observing glue to translate NSArrayController -selectionIndexes changes into a set of NSIndexPaths and call NSCollectionView -selectionIndexPaths, and vise versa. Hope that helps. Good luck.
—Rob > On Nov 2, 2016, at 7:31 AM, Steve Mills <sjmi...@mac.com> wrote: > > So NSCollectionView can bind its selectionIndexes, so I've bound that to an > array controller that's shared with an NSTableView. Only one of the two are > ever shown at the same time, but many things depend on the array controller's > selectionIndexes. The trouble is, changes to the collection view's selection > don't notify the selectionIndexes binding. I've subclasses the collection > view just so I could override all the various selection methods to see what's > going on. The methods that use a set of NSIndexPath are always called, but > the NSIndexSet versions are not. > > On the other side of the mountain, selection cells in the table view always > updates the bound property, so the collection view gets notified that the > selectionIndexes have changed. > > How can I make NSCollectionView work better? I didn't have this problem when > I was using IKImageBrowserView instead of NSCollectionView. Seems silly that > Apple added all the stuff to support multiple sections, but didn't bother to > keep things working with regard to the binding. > > -- > Steve Mills > Drummer, Mac geek > > > _______________________________________________ > > 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/petrock%40mac.com > > This email sent to petr...@mac.com _______________________________________________ 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