Re: setDoubleAction: for NSTableView
Re: setDoubleAction: for NSTableView
- Subject: Re: setDoubleAction: for NSTableView
- From: Greg Titus <email@hidden>
- Date: Fri, 22 Jun 2001 18:19:13 -0700
On Friday, June 22, 2001, at 03:31 PM, Jason Brown wrote:
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:)];
Yes, the action is sent to the views target, not its delegate. So you
either need to hook up the target and action in IB (if you want a single
click action as well), and then use your line of code above to set the
double action, or if you don't want a single click action at all, you
need to add:
[masterTableView setTarget:self];
Hope this helps,
--Greg