mouseup/mouseDoubleUp

Peter Haworth pete at mollysrevenge.com
Tue Feb 1 16:30:55 EST 2011


Thanks for your thoughts Richard.  Couple of points to be made.

I am not clicking or double clicking on a button, I am clicking on the header of a datagrid.  Furthermore, I'm looking for right clicks since a left click on a datagrid header sorts the datagrid by the clicked column and I want to retain that functionality.  

Here's the logic I am trying to implement. A single right click on a column heading brings up a modal dialog where the user can enter search criteria for the data in that column.  After filtering the data, I append an asterisk to the column label to indicate that a filter is in place.  A single right click on a column that is already filtered removes the filter for that column and the asterisk in its label.  So the right click is an on/off switch for filtering data in a specific column.  Then I wanted a way to remove filters on all columns and that's where the double right click came in to play and all hell broke loose!  

Your thoughts have made me realise I should provide an Undo menu item and keystroke equivalent for the removal of all filters.  In fact, as mentioned in an earlier post, I agree that the double click is probably not the way to go for what I want to do.  

So implementation of all this according to HIG is one thing and I may have made a bad choice there, but the mouseDoubleUp message is never sent in my scenario, at least my handlers never see it.  I can accept that the first click generates a mouseUp message but the second click within the doubleUpInterval should generate a mouseDoubleUp shouldn't it?  That's what I consider to be a bug.

Pete Haworth

On Feb 1, 2011, at 12:28 PM, Richard Gaskin wrote:

> 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 file object.
> 
> 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 a selection.
> 
> 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 email:
> 
>   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 be best.
> 
> 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.
> 
> --
> Richard Gaskin
> Fourth World
> LiveCode training and consulting: http://www.fourthworld.com
> Webzine for LiveCode developers: http://www.LiveCodeJournal.com
> LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 





More information about the use-livecode mailing list