开发者

NSCollectionView selection index

开发者 https://www.devze.com 2023-02-15 12:21 出处:网络
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 s

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

精彩评论

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