LNS Home
Script Debugger
Download & Buy
x Explore
x Edit
x Run & Debug
x Deploy
What's New In 4.5
bullet Documentation
bullet Blog Posts
My SD Story
Software Updates
 
4.0.9 Update
3.0.9 Update
bullet 2.0.5 Update
x Free Downloads
 
XML Tools
XSLT Tools
x Property List Tools
x List & Record Tools
Register Your Copy of Script Debugger
Join the Script Debugger Mailing List
x AppleScript/ Scripting Links
Products
x Script Debugger 4.5
Site Contents
bullet Mark’s Blog
Product Registration
Bug Reporting
x Freeware
Contacting Us

SD4 Headling


image

Hey, Script Debugger Changed My Formatting!

image

Sometimes it happens that the appearance of your script is changed in ways you never intended. For example, you carefully use the line continuation character to break up a long line of code, like this:

set r to display dialog "What is your favorite color?" ¬
  default answer "Blue. No, red!" ¬
  buttons "Aaaaaaaagh!" ¬
  default button "Aaaaaaaagh!" ¬
  with title "A Crucial Test"

But suddenly it appears broken up all incorrectly, like this:

set r to display dialog ¬
    "What is your favorite color?" default answer ¬
    "Blue. No, red!" buttons ¬
    "Aaaaaaaagh!" default button ¬
    "Aaaaaaaagh!" with title "A Crucial Test"

Why is Script Debugger doing this to you? We’re sorry this is happening, but Script Debugger has nothing to do with it. This is a “feature” of AppleScript. It has to do with the fact that a script is compiled into bytecode and then displayed to you in decompiled form. There are some annoying behaviors deep within that round-trip process, and this is one of them. There’s nothing Script Debugger can do to prevent it.

A related behavior is that although AppleScript will let you use a term’s synonym, it will also sometimes replace the synonym in the decompiled script. So, for example, close document 2 saving false is legal, but it is changed to close document 2 without saving (and you are probably familiar with the expansion of app to application, ref to a reference to, and so forth).



Explore | Edit | Run & Debug | Deploy | What's New In 4.5 | My SD Story


Copyright © 1998-2009 Late Night Software Ltd. - All Rights Reserved.