I want to popup a NSMenu
when the user right-clicks on a NSTableCellView
within a NSTableView
.
let cell = myTableView.make(withIdentifier: "myCustomTableCellView", owner: self) as! MyTableCellView // subclass of NSTableCellView
let menu = NSMenu()
menu.autoenablesItems = false
menu.addItem(NSMenuItem(title: "Test", action: nil, keyEquivalent: ""))
cell.menu = menu
But the menu pops not up if the user clicks on the cell.
I couldn’t find any sendActionOn
methods or something similar.
Would be great if someone could help!