Re: setDoubleAction: for NSTableView
Re: setDoubleAction: for NSTableView
- Subject: Re: setDoubleAction: for NSTableView
- From: Brian Hill <email@hidden>
- Date: Fri, 22 Jun 2001 20:34:02 -0500
On Friday, June 22, 2001, at 05:31 PM, Jason Brown wrote:
Hi all. Back again with this question:
Given that masterTableView is of type NSTableView, shouldn't the
following make it so that double-clicks from the mouse will invoke the
handleTVDoubleClick method as indicated? The controlling object that
implements handleTVDoubleClick is the delegate for masterTableView. Is
there something more that I need to add to this to make it work?
[masterTableView setDoubleAction:@selector(handleTVDoubleClick:)];
If this code is in the same class as the handleTVDoubleClick: method,
try adding this:
[masterTableView setTarget:self];
If you haven't wired up the 'single click action' in IB (which does this
automatically), you need to specify the target in code.
Brian.
email@hidden
http://personalpages.tds.net/~brian_hill
"Why? I came into this game for adventure - go anywhere, travel
light, get in, get out, wherever there's trouble, a man alone.
Now they've got the whole country sectioned off and you can't
move without a form. I'm the last of a breed."
-- Archibald "Harry" Tuttle, Rogue HVAC Repairman