Set DoubleClickInterval very low!
mark at livecode.com
Thu Aug 4 03:07:09 EDT 2016
All I was pointing out was that the current mechanism means you need to put in shim doubleMouse handlers in the controls which don't respond to double clicks *and* you have to write more code if you want to handle triple click.
A simpler pattern (I think at least) is the one I suggested where you get no doubleMouse messages but can get easily how many clicks have occurred in the current sequence.
This topic I think has come up several times over the years which suggests that the current behavior isn't perhaps the most obvious (and is ever so slightly misleading) however, admittedly, it is perhaps less important than other things if only because it is all scriptable - you just need to think how to script it.
Sent from my iPhone
> On 4 Aug 2016, at 01:35, Richard Gaskin <ambassador at fourthworld.com> wrote:
> Mark Waddingham wrote:
> > On 2016-08-04 01:32, Sannyasin Brahmanathaswami wrote:
> >> How is it a bug? logically the engine must wait for the double click
> >> interval before responding or double clicks could never be passed?
> >> N'est ce pas?
> > No - that isn't how double clicks work in LiveCode.
> I think LC's implementation is similar to how most OSes handle it, at least judging from the old Inside Mac details on click interval and slop rect, and the XP refs I used to read.
> Given that, I'm not sure we need to have you spend time away from other tasks to explore this:
> > This is a long standing (i.e. forever!) 'the way things work' in
> > LiveCode - although I think there is a way it could be a great deal
> > better, and more intuitive.
> > The only use of multi-click 'gestures' (which is what 'double clicks'
> > are) which makes sense from a UI interaction point of view is where
> > each
> > click builds upon the action of the previous one.
> > e.g. In Finder:
> > 1) The first click selects a file
> > 2) The second click runs the file (which is already selected at
> > this point)
> > e.g. In Text Editors:
> > 1) The first click places the caret
> > 2) The second click selects the word the caret is in
> > 3) The third click selects the line the word is in
> Those are both very good examples of the noun+verb interaction model for applying commands to object in WOMPs, which personally I feel is reasonably well supported in LC as it is.
> In brief, we first select an object (noun), and then perform an action on it (verb).
> Often the action is a command chosen from a menu, which would then act on whatever we'd selected. But sometimes a shortcut is provided for a menu action, such as in these examples with a second click.
> In practice it's extremely rare that we find any object that truly supports different actions on both single and double-clicks.
> The Finder example *seems* at first glance like such a case, but as we think about it more it becomes clear that no action ever takes place on the first click, it's always just a selection; the second click is the action, and which action it is will depend on the time/space constraints from the first click.
> Given all this, there may be other benefits to the proposed enhancements you outlined, but so far it seems all practical needs for supporting single- and double-clicks have been handled well with LC's current mouse messages.
> Indeed, for the rare case when one truly wants a single object to support actions on both single- and double-clicks, we've seen examples from the readers here of how we can keep track of the time between clicks to support even that edge case.
> Whether we keep track of the interval or the click count makes no difference to me, but with the latter we'd still need to maintain an awareness of the interval anyway, and best of all the current model is already done and ready to use. :)
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> Ambassador at FourthWorld.com http://www.FourthWorld.com
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode