简体   繁体   中英

How to call an action on double click at a custom NSCell in Cocoa?

i have an NSTableView with custom view cells from NSCell

i'm now trying to get the double click action with this code


[theTableView setDoubleAction:@selector(myDoubleClick:)];

and i have the method set like this:


- (void)myDoubleClick:(id)sender{
 NSLog(@"double click");
}

when i double click the cells nothing happens and the nslog is not showing a thing.

maybe it is something with my customs cell.

any suggestions on this?

您应该在IB上选择行并设置列绑定,选择从一个控制器中选择一个选择器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM