Skip to content

Instantly share code, notes, and snippets.

@hammerdr
Created November 20, 2009 12:01
Show Gist options
  • Save hammerdr/239457 to your computer and use it in GitHub Desktop.
Save hammerdr/239457 to your computer and use it in GitHub Desktop.
@import <AppKit/CPTableView.j>
@implementation CPTableView (DoubleClick)
- (void)mouseDown:(CPEvent)anEvent
{
if ([anEvent clickCount] == 2)
{
var index = [[self selectedRowIndexes] firstIndex];
if(index >= 0)
{
objj_msgSend([self target], [self doubleAction], self);
}
}
[super mouseDown:anEvent];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment