How do I find what's selected in a NSCollectionView?
I have a NSCollectionView (binding to a NSCollectionViewItem and a NSArrayController where a NSBox is the root item and changes background when selected) and I can't figure out where to find out which item the user selected.
I tried a few things but all returned null:
- send the NSCollectionViewItem a representedObject message
- send the NSCollectionView a selectionIndexes message
- send the NSArrayController a selectedObjects message
- send the NSAr开发者_StackOverflow中文版rayController a selectionIndexes message
- send the NSArrayController a selectionIndex message
Any help would be appreciated!
精彩评论