7.0.1-RC1 selectively not obeying "open card in script?

Peter Brigham pmbrig at gmail.com
Fri Nov 7 21:04:28 EST 2014


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
pmbrig at gmail.com
http://home.comcast.net/~pmbrig



More information about the use-livecode mailing list