Re: NSTableView action & doubleAction...
Re: NSTableView action & doubleAction...
- Subject: Re: NSTableView action & doubleAction...
- From: Matt Neuburg <email@hidden>
- Date: Sun, 06 Jun 2010 18:44:59 -0700
- Thread-topic: NSTableView action & doubleAction...
On Sun, 6 Jun 2010 18:12:07 -0700, Matthew Weinstein <email@hidden>
said:
>I set both my tableView's actions and doubleActions programmatically in my
document's windowdidloadnib... I find that if I double click It calls both!
You're doing both. :) The only way to tell the difference is to delay after
the first click to see whether there's a second (just like the way you tell
the difference between single and double-tap on iPhone).
I guess the question is why you want to do this in the first place. I've
written lots of applications where double-clicking in a table did something,
and in *none* of them did I also need to implement something for
single-clicking. I get an event (thru the delegate) when the selection
changes and *that* is usually what I'm interested in. (Actually, in this
modern age, it's usually enough to let bindings handle the selection
change.) Do you really want something utterly special and unique to happen
when the user single-clicks on a row that is already selected? That would be
a very strange interface; the user is likely to be very surprised. If you
want to make that sort of thing clear, I'd suggest you put a button in the
row and catch the click from *that*. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden