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

Comment

image

Commenting and uncommenting code is a common need when developing AppleScript code, and Script Debugger provides an editing shortcut for doing this.

  • To comment out a stretch of code, select the code and choose Edit > Comment. Script Debugger will extend the selection to consist of complete lines, and will then insert a single-line comment character at the start of each of those lines.

  • To turn comments into code, select some code and choose Edit > Uncomment. Script Debugger will extend the selection to consist of complete lines, and will then remove a single-line comment character from the start of each of those lines, if there is one. (If there isn’t one, that’s fine. The line is left unaltered.)

(You can also add Comment and Uncomment buttons to the script window’s toolbar.)

Why does Script Debugger use single-line comments rather than surrounding the selected text with block comment delimiters, (* like this *)? One reason is that block comments are fragile. An unbalanced double-quote within block comment delimiters will keep your script from compiling. Single-line comments are simpler. In fact, with Script Debugger, multiple single-line comments are easier to deal with than block comments. To insert block comment delimiters, choose Clippings > Block Comment.

An Editor preference governs what is actually inserted at the start of each line when you choose Edit > Comment. This permits you to use, for example, either -- (the traditional comment character) or “#” (the new comment character introduced in Mac OS X 10.5), and to set the number of spaces that should follow the comment character.



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


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