I have a view-based NSTableView that is populated through bindings. My textFields & imageViews are bound to the NSTableCellView’s objectValue’s properties.
If I want to have an edit/info button in my NSTableCellView:
-
Who should be the target of the button’s action?
-
How would the target get the objectValue that is associated with the cell that the button is in?
I’d ultimately like to show a popover/sheet based on the objectValue.
Your controller class can be the target. To get the object value:
Or, use a subclass of
NSTableCellView, make the cell view the target of the button’s action, and call[self objectValue]to get the object.