I have an app with 2 separate NSWindow loaded.
Each window has one small table with two items in it.
Here's the problem i cant seem to solve -->
If window #1 is active/focused, i can click on the individual rows in the table normally. But if i want to click the rows in the table within window #2, I have to click the table twice. The first click to get Window #2 in active/focused, and finally the second click to actually select the row.
How can i get to select the rows in the NSTableViews in only one click (regardless if their windows are in focus or not) ?
I sub-classed the NSTableView.
-(BOOL)acceptsFirstMouse:(NSEvent *)theEvent {
return YES;
}
Create an IBOutlet of your NSTableView as:
IBOutlet NSTableView* yourTable;
Bind it to your table.
Then use:
[window2 makeFirstResponder: yourTable];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With