Distinguishing simple and double clicks
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Tue Sep 23 13:04:39 EDT 2008
Bonsoir Richard,
Le 23 sept. 08 à 17:48, Richard Gaskin a écrit :
> Eric Chatonet wrote:
>> I just want to make something that was easy with HC: e.g. allow the
>> user to use simple and double clicks on the same button but with
>> different actions.
>> MouseUp is always sent by the engine first then mouseDoubleUp is sent
>> if appropriate.
>
> Is that not how HyperCard works?
Yes for sure but as mouseDoubleUp did not exist, it was making things
finally simpler ;-)
> If HC sends only one message or the other, then it must be adding a
> delay to the mouseUp before firing its mouseUp message in order to
> be able to distinguish it from mouseDoubleUp. :\
Sure but I wonder: in many apps when does exist this ability, it does
not seem there is an extra delay: how is this possible?
Actually, I don't think it's possible without extra delay...
> As for the task itself, your handlers look good for what you want
> to do so I'd go with those, but the question has me curious: What
> is it you're working on?
I have web pages filmstrips and a simple click opens a viewer related
to a database while a double click goes to the 'real' page in your
current browser.
Of course I could replace the double click with a shift click but,
from an ergonomic point of view, it's not satisfying: two hands
instead of one...
All that knowing that hovering a thumb is enough to select it.
> I ask because when I read David Bovill's comment that this is a
> common task, at first glance I thought so too but after thinking
> about it some more I wonder if there's a subtle distinction at play
> here between common and less common use of those two messages in a
> single control.
>
> --
> A little background for those who may not have considered the
> abstraction of the "noun-verb" interaction model:
>
> Most modern GUIs employ a noun-verb model, in which a noun object
> is selected and then a verb object is selected which operates on
> that noun.
>
> For example, when you select text you're specifying the "noun", and
> then choosing "Bold" from the Style menu selects a "verb" (command)
> to operate on that noun.
>
> The double-click gesture is commonly used as a shortcut to
> selecting a verb, and is generally handled in a noun object (see
> <http://developer.apple.com/documentation/UserExperience/Conceptual/
> AppleHIGuidelines/XHIGUserInput/chapter_12_section_2.html#//
> apple_ref/doc/uid/TP30000361-TPXREF8>).
>
> For example, in the Mac's Finder or Windows' Explorer, you can
> select an icon (the noun) and then select File->Open (the verb), or
> as a shortcut you can double-click the noun object to trigger that
> most common verb.
>
> We also see this in list controls, where I tend to use
> mouseDoubleUp most frequently, to trigger a default button.
>
> For example, suppose you have a list picker dialog with three
> controls: list field, "OK" button (default) and "Cancel" button.
> The explicit way of working with the dialog is to select the item
> in the list (the noun) then click "OK" (the verb), but it's common
> in many dialogs which have a default button to trigger that default
> button when the user double-clicks in the list as a shortcut.
>
> In such selector controls I often have a mouseUp handler, but since
> it's in a noun object it usually just updates the current view to
> reflect the selection, rather than perform an action.
>
> So while I can think of many examples of noun objects that use
> double clicks as a short cut for selecting a verb object, offhand I
> can't think of an example where a verb object handles double-clicks.
> --
>
> From your description it almost sounds like the control in question is
> a verb object such as a command button, rather than a noun object
> such as an icon or list item. Do I understand that correctly?
Not exactly: as you have understood it, it's not a button but an
image in a sophisticated custom control.
> If so, what is it about the interaction that requires that?
>
> Or to word it in a more solutions-oriented way, might a change to
> the UI make for an interaction model which maintains the
> traditional noun-verb expectation?
In a certain sense, yes ;-)
As you, I have deeply studied all guidelines (especially Apple ones
that always have been better thought :-) but times have changed:
Look at iTunes or iPhoto, and other software that even don't use any
menu (except contextual ones).
People needed a strong 'layout syntax' ten or twenty years ago: now,
it's a bit different: intuitive understanding, simplicity, several
levels to make an app limpid for beginners but able to provide
sophisticated features to advanced users without overloading its
interface is the new canon :-)
> While not every difference between HC and Rev favors Rev, this is
> one where perhaps Dr. Raney's doctorate in cognitive psychology may
> have shown itself well: while HyperCard eats clicks on double-
> click (and presumably introduces a delay to make that possible),
> Rev gives the developer the freedom to handle them both, confident
> that in most cases it'll be fine since it conforms to the most
> common interaction model.
The problem is that a simple click is not another thing than the
first click of a double click ;-)
> Am I wearing rose-colored glasses on this? Are there common
> examples of verb objects handling double-clicks that I've
> overlooked? (Sometimes good coffee breeds unwarranted optimism <g>.)
Actually, I agree with you. More: models built twenty years ago have
to be known precisely in order to be overtaken :-)
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------
More information about the use-livecode
mailing list