cocoa - NSCollectionView get selected item on button click -


i have nscollectionview bound nsarraycontroller has nsmutablearray content. items in nsmutablearray displayed should.

i have windowcontroller class holds reference nsmutablearray. there button causes buttonclicked message sent windowcontroller.

now inside buttonclicked want know item selected in nscollectionview. how do this? have no reference nsarraycontroller otherwise have asked sending selection. i've studied sample code no avail.

how can reference selected item in nsarraycontroller?

if nscollectionview getting content nsarraycontroller, there binding set in ib on content or have programmatically bound these, there binding available on collectionview's selectionindexes, when bound arraycontroller give 'a reference selected item' in arraycontroller , collectionview.

nscollectionview's itematindex, handed selected item's index, actual item selected.

is actual item selected looking obtain reference to?


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -