ambassador at fourthworld.com
Tue Feb 1 14:28:25 CST 2011
Peter Haworth wrote:
> I have to respectfully disagree that this isn't a bug. The
> mouseDoubleUp message never happens in these circumstances,
> at least in my application, that's the bug. Even if it did,
> what's the point of having a mousedoubleup message if I have
> to handle it by extra code in the mouseUp message?
I think Jacque put this succinctly:
I don't know of any HIG that officially supports
double-clicking a button. In fact, it's common
to put in scripts explicitly blocking double-clicks
from doing anything.
GUIs are driven by an implied noun-verb interaction model, in which the
user selects an object (noun) and applies an action to it (verb).
Push buttons are commonly verb triggers - that is, they perform an
action, usually on some object other than themselves. The things verb
objects act on could be consider nouns.
Consider these common operations:
- You select text in a field, then click a "B" button in a toolbar
to make its style bold.
- You select a file object in the Finder, then select File->Open
to open it.
The latter is a good example here, because it reminds us that most
people use the shortcut for File->Open, which is to double-click the
In that case, the verb object is a separate thing, the File->Open menu
item. Double-clicking the noun object (the file) is merely a shortcut
for triggering the most common action performed on the object.
Note that single-clicking a file object triggers no action; it's merely
You'll see a similar pattern in many dialogs that contain lists with a
default button: you can single-click a list item to select it and then
click the default button to apply that action to the selection, or you
can double-click the list item to trigger the default button.
In each of these cases the verb and noun objects are different things,
and the single-click merely selects the object but performs no action on
it, and a double-click is merely a shortcut to a diffent action control.
So while it's common to see double-clicks used throughout many UIs,
they're almost always a shortcut to a more visible verb trigger, and I
can't think of any example in a popular app in which an object that
triggers an action on double-click will also trigger a different action
with a single-click.
There may be one, perhaps even two if we search far and wide, but here I
would use what I like to call the Brother Guy Threshold: "Name three". :)
In your app, the double-click acts as a sort of Undo - from your earlier
The single mouse click invokes the modal dialog that was the
subject of my defaultStack problems. The double click basically
undoes the what the modal dialog logic did.
Given how frequently users accidentally double-click objects, you could
consider a "Reset" or "Undo Changes" button next to the one that invokes
the dialog, or perhaps a menu item or some other visible element.
As the OS X HIG suggests (in User Input/Double-Clicking):
Double-clicking is most commonly used as a shortcut for other
actions, such as pressing Command-O to open a document or
dragging to select a word. Because not everyone is physically
able to perform a double click, it should never be the only
way to perform an action.
The ways this could be optimally handled will vary according to the
specifics of the app, of course, and it may well be that yours is the
rare case where having one push button perform two different actions may
You're free to submit a bug report on this if you like, but don't be
surprised if it gets flagged "Not a bug", since the only way to "fix"
this would be to delay processing of all mouse clicks by the
doubleClickInterval, and would only benefit the exceptional rare case
relying on both messages in a single control.
For such unusual behaviors it seems reasonable to expect the scripter to
craft the unique behavior they want - Craig did a great job on coming
through with that so quickly.
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
More information about the use-livecode