"send mouseUp to…" vs "click at the loc of..".

Richard Gaskin ambassador at fourthworld.com
Fri Jan 3 13:17:16 EST 2014


Stephen Goldberg wrote:

 > Just a note about a discovery I just made, in case it is not
 > generally known:  The speed of a script, especially when
 > dealing with many cards, is improved significantly by writing
 > "send mouseUp to…" instead of "click at the loc of…"

Using "dispatch" is even faster, and faster still (and often more 
robust) is for both scripts to make a direct call to a handler defined 
further along the message path.

Where "click at the loc of..." is useful is in providing a visual 
reinforcement for a user action, since the additional time is being 
consumed by the button hilite, which can be very useful.

For example, if you want a default button triggered by a doubleClick in 
a list, having that button hilite momentarily as its script is triggered 
helps remind the user of what exactly is happening, that the doubleClick 
is really just a shortcut for clicking the button directly.

But in cases where such affordance is of little or no value, indeed 
bypassing the complex compositing routines needed to hilite the button 
will make it much perkier.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys





More information about the use-livecode mailing list