Setting double action from NSCell
Setting double action from NSCell
- Subject: Setting double action from NSCell
- From: Ian was here <email@hidden>
- Date: Fri, 11 Nov 2005 15:21:58 -0800 (PST)
I have an NSOutlineView with a single column. Each
type of cell must react to a double click in it's own
way. There is no doubleAction: method for an NSCell,
so I used the the following:
- (void)outlineView:(NSOutlineView *)olv
willDisplayCell:(NSCell *)cell
forTableColumn:(NSTableColumn *)tableColumn
item:(id)item
{
if ( [item type] == myCellType )
{
[theCell setTarget:self];
[theCell setAction:@selector(myAction:)];
}
}
Unfortunately, ALL cells got this behaviour. I would
like to have a specific row or cell being double
clicked call an action method, but all other cells can
have their text edited from a double click (which is
default behaviour).
Thanks
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden