js-osx-app-examples
js-osx-app-examples copied to clipboard
NSMatrix selected item
your examples very awesome how can i get NSMatrix selected item... Item.tag or item.index for example
Hey @Slavetz. I'm looking at the NSMatrix docs https://developer.apple.com/reference/appkit/nsmatrix?language=objc but I'm not sure how to get the selected item. Would have to dig in further. It's been a while since I worked with these examples.
its work as:
console.log(matrix1.selectedCell.title.js);
console.log(matrix1.selectedCell.tag);
And one moment... if you need select other cell as default (not first) you need to use selectCell
method, selection of different state for cells is not enough
matrix1.selectCellAtRowColumn(row, column)
matrix1.selectCellWithTag(tag)
tag, row, column must has int value