Re: Using setDoubleAction with NSTableView
Re: Using setDoubleAction with NSTableView
- Subject: Re: Using setDoubleAction with NSTableView
- From: Julio Cesar Silva dos Santos <email@hidden>
- Date: Mon, 6 Jun 2005 20:27:15 -0300
Maybe I should explain the problem with an example:
Let's describe the method:
-(void)cellClicked
{
NSIndexSet * currentSet = [table selectedRowIndexes];
NSLog(@"Current Set: %d\n",[currentSet firstIndex]);
NSCell * currentCell = [[[table tableColumns] objectAtIndex:2] dataCellForRow:[currentSet firstIndex]];
NSLog(@"Current Cell: %@\n", [currentCell stringValue]);
}
Let's make a table with the result of double-clicking:
Row Current Set Current Cell
0 0 Value of row 0 OK
1 1 Value of row 1 OK
2 2 Value of row 2 OK
1 1 Value of row 2 Ops (index has changed but not the cell value)
0 0 Value of row 1 Ops (now the cell value has changed but it now has the value of the previous index)
Julio Cesar Santos
email@hidden
eMac 1GHz ComboDrive
640MB RAM
Linux User #359973
On Jun 06, 2005, at 13:25, Corbin Dunn wrote:
This is my first message to this list and I would like to know if somebody had (or is having) the same problem of mine. I have set the action setDoubleAction to an NSTableView and it has worked fine except for a strange behaviour: if I double-click the rows in a top-to-bottom way the action is triggered normally, but when I double-click one of the previous rows nothing happens and if I start over clicking the next row the action is triggered again. Isn't it strange?
This might be a "speed" issue. If you do more than a double-click, tableview will not send the doubleClick action. (ie: triple, or greater, clicks will not send the message). So, if you are clicking around very quickly, it is possibly you are sending more than a double click.
-corbin
_______________________________________________
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