lost features scripteditor 3.0

Bernard Devlin bdrunrev at gmail.com
Mon Sep 8 04:01:47 EDT 2008


On Sun, Sep 7, 2008 at 8:03 PM, Jim Ault <JimAultWins at yahoo.com> wrote:

>
> You might try the following technique for debugging user controls and key
> presses.  One advantage to this is that you can debug-step & change the
> state of the globals using the variable watcher, thus always control those
> values.
>
> global gMseDn, gCntrlDn, gAltOptDn, gCmdDn, gShftDn
>
> on mouseDown
>    put 1 into gMseDn
>
> [snip]


I routinely do something similar with many of (what I would call) the object
model properties , e.g

puf the mouseLoc into tMouseLoc
or
put the long name of the target into tTargetLongName

I've found that code can get really confusing if the debugger starts and I'm
referring to the values by function name, as the value returned can change
to represent values that pertain to the debugger as an application rather
than to my application.

I find it's better to just grab the values from the application context
asap, then if later on I need to debug that handler (maybe for something
completely different), I don't get thrown off track by such object model
properties containing values from the context of the debugger.  I then
breakpoint after I've got hold of those values before the debugging sesssion
begins.

Bernard



More information about the use-livecode mailing list