I tried that. I just prefer declaring all variables and not have to bother with extra key modifiers while typing.
I guess there'll never be a group agreement on the use of explicit variables, i's just a matter of personal preference. Pete lcSQL Software <http://www.lcsql.com> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html> On Fri, Nov 7, 2014 at 6:04 PM, Peter Brigham <[email protected]> wrote: > 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 > [email protected] > http://home.comcast.net/~pmbrig > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
