Re: iTunes-like single-click table cell editing
Re: iTunes-like single-click table cell editing
- Subject: Re: iTunes-like single-click table cell editing
- From: Ryan Stevens <email@hidden>
- Date: Wed, 19 Jan 2005 07:18:51 -0800
On Jan 19, 2005, at 5:38 AM, M. Uli Kusterer wrote:
At 1:13 Uhr +0100 19.01.2005, Benjámin Salánki wrote:
now the problem is that my table starts editing right after the first
click of the double click. i tried looking for [theEvent clickCount],
but it turns out mouseDown is called after every click, so when I
NSLog it I get 1 (editing code starts) and 2, which starts the
doubleAction for the table.
do you know how to fix this?
Someone sent me code for UKDistributedView to do that. What you
essentially do is register a timer that fires a little after the
double click delay. This timer only starts editing of the cell.
Whenever a click happens on a cell, you invalidate and release this
timer.
Thus, when a user clicks at the line once, it will take a little time,
then the timer will fire and the cell will edit. When a user
double-clicks the cell, the second click will remove the timer, and
the cell won't edit.
I wonder then, is it easy to get the actual delay time as set in System
Preferences? Couldn't your timer fire before a second click is received
if you don't use delay+some?
Pretty smart way to do it btw.
_______________________________________________
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