osx - NSTableView single click action -
how capture event of single-clicking on row of nstableview
, trigger action? (idealy, should trigger action left clicks only, not right clicks, not required.)
implementing -tableviewselectiondidchange
of table view's delegate close want. however, if row selected, clicking on row again doesn't call -tableviewselectiondidchange
since selection didn't change.
connect selector action event on table view (better interface designed),
- (ibaction)onaction:(id)sender { nstableview* tableview = (nstableview*)sender; // use tableview.selectedcolumn/tableview.selectedrow selection }
you can connect code if want fro viewdidload:
[self.tableview setaction:@selector(onaction:)];
Comments
Post a Comment