phil
New Droid
Posts: 7
|
Post by phil on Jan 6, 2015 11:10:08 GMT
Like Script Editor, DisplayDroid will compile and run scripts with handlers placed anywhere in the script.
However, the debugging tools are a little more fussy. Because the debugging tools effectively run each script line by line, you need to ensure all handlers appear in your script before they are actually called in a command.
For example, to take advantage of the debugging tools, your scripts need to be structured like this:
on myHandler(aWord) display dialog aWord end
myHandler ("hello DisplayDroid!")
If your scripts have commands calling handlers before they are defined, like this:
myHandler ("hello DisplayDroid!")
on myHandler(aWord) display dialog aWord end
the debugging tools will throw an error: »script« doesn't understand the 'myHandler' message.
|
|