On Nov 6, 2014, at 4:58 PM, Peter Haworth wrote:

> I spent an hour yesterday trying to track down a bug that turned out to be
> caused by a misspelled variable name.

I don't use explicit variables, so I avoid misspelling variable names by using 
Jaques' scriptPaint handler. Put this into a universal (frontscript) library 
script, so it's available everywhere in LC:

on controlkeydown which
  if which = space and the shiftkey is down then
     put the long name of the target into targRef
     if "field" is not in targRef then pass controlkeydown
     if "revNewScriptEditor" is not in targRef then pass controlkeydown
     put the mouseText into the selection
  else
     pass controlkeydown
  end if
end controlkeydown

Then just set the insertion point in a script and hover over a variable name 
and hit the spacebar (with control + shift) and the variable name is copied 
over for you. Adjust the modifier keys as needed -- in my workflow I use 
control-shift-<key> for all my scripting shortcuts.

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to