[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: state of setAction for NSTableView
From: |
Gregory John Casamento |
Subject: |
Re: state of setAction for NSTableView |
Date: |
Tue, 8 Jun 2004 21:33:41 -0700 (PDT) |
--- Fred Kiefer <fredkiefer@gmx.de> wrote:
> Matthew Weinstein wrote:
> > Trying to use setAction with nstable view. It seems to do nothing.
> > setDoubleAction: (or whatever it's called) works like a charm. Looking
> > at the NSTableView code does seem to confirm that there is no "there
> > there". Am I wrong?
> >
Yes. You also need to use setTarget:. I just ran a test connecting a
tableview to an action on the application and it calls the method correctly.
Please see below...
> There is some code in [NSTableView mouseDown:] that could cause the
> action to be send, but all of the code here is rather strange and we
> really need somebody to clean it up. You are welcome to start with this.
>
> Fred
The setAction: method sets the action to be executed on the specified target,
specified in setTarget:, when a user clicks (single click) on the table.
It is overridden in tableview, since tableview is a control which doesn't have
a "cell". The superclass, NSControl, calls [cell setAction:] in the
setAction: method.
Don't remove this code.
GJC
=====
Gregory John Casamento -- CEO/President Open Logic Corp.
#### Maintainer of Gorm for GNUstep.
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/