开发者

NSCollectionView selection index

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜