On Nov 26, 2013, at 2:01 AM, Paul Berkowitz wrote: But if you explicitly declare them as local, that shouldn't happen.
True! Any variable used in a run handler is, by default, a global variable. If you want run handler variables to be local, you have to explicitly declare them, for example …
on run local a, b, c, d, e, f
But where in the AppleScript Language Guide is this stated? I've just looked in the most recent pdf and could not find this. I also looked in a very old paperback copy of ASLG and could not find it. (But, I know it's there … somewhere!)
You can also simply avoid the use of any variables in the run handler. Like this ...
on run try my main() on error errText number errNr if errNr = -128 then return else if errNr = -2700 then my showInstruction(errText) else my showError(errText, errNr, false) end if end try end run -------------------------------------------------------
|