Re: setDoubleAction in tableView
Re: setDoubleAction in tableView
- Subject: Re: setDoubleAction in tableView
- From: Brant Sears <email@hidden>
- Date: Mon, 17 Nov 2003 12:44:06 -0800
The method also needs to take an argument.
So, you'd change
-(void)openFileInBrowser
to
-(void)openFileInBrowser:(id)sender
and then also add the semicolon in the setDoubleAction call. You may also
need to go into your NIB and turn off editing for the columns. If you don't
do that, double clicking can end up with a blinking caret. You also need to
call setTarget: on the NSTableView if you haven't already.
>
Kurt, the argument to your selector has no colon (:) after it. I think
>
that is an integral part of the method name.
>
Randy
On Nov 17, 2003, at 11:00 AM, Kurt Marek wrote:
>
I'm having some trouble getting a an action to fire when a row is
>
double-clicked, but I can't figure out what the problem is. I have two
>
tableViews each being run by a different controller. One works fine
>
with a double click, but the other one doesn't seem to fire the method.
>
>
I have this is my awakeFromNib method for the controller:
>
[myTable setDoubleAction:@selector(openFileInBrowser)];
>
>
And then this implementation of the method:
>
>
-(void)openFileInBrowser {
>
NSLog(@"double Clicked table row");
>
//
>
}
>
>
The table is an outlet from the controller and it is hooked up
>
correctly in IB. I never get the output to the console. I can't quite
>
figure it out because I have the other table hooked up exactly the same
>
way and it seems to work fine. Any ideas on what I might be missing?
>
>
Kurt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.