I have a view-based single-column NSTableView. Inside my NSTableCellView subclass I have an NSTextView which is selectable, but not editable.
When the user clicks on the NSTableCellView directly, the row highlights properly. But when the user clicks on the NSTextView inside that NSTableCellView, the row does not highlight.
How do I get the click on the NSTextView to pass to the NSTableCellView so that the row highlights?
Class hierarchy looks like:
NSScrollView > NSTableView > NSTableColumn > NSTableCellView > NSTextView
Here’s what I ended up doing. I made a subclass of NSTextView and overrode mouseDown: as follows…
I’m reusing NSTextView’s standard delegate…
And in the header…
In the delegate, I implement didClickMyTextView: to select the row.