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

Expressions

image

An expression is a piece of AppleScript code that has a value. Expressions are evaluated every time the script pauses.

You create expressions and read their values in the expressions pane, the fourth pane in the results drawer. You do not have to be in debug mode to create an expression. Expressions are saved when you save the compiled script.

image
  • Use the + button to create an expression, or you can choose Script > New Expression.

  • A convenient shortcut is Script > Copy To Expressions, which copies the currently selected text in your script as a new expression.

  • To remove an expression, select it and use the - button, or press the Delete key.

  • To remove all expressions, choose Script > Clear All Expressions.

  • The circular arrow button forces the currently selected expression to be re-evaluated.

Expressions have certain similarites to the variables pane:

  • The expressions pane is an explorer view, and an entry in it can be opened as a separate viewer window, whose value is automatically updated at each pause.

  • An expression whose value has changed since the last pause is shown in red.

  • An expression is re-evaluated when you select a different stack frame in the call stack.

If an expression uses a name that is undefined at the point where we are currently paused and in the call stack context that is currently selected, its value is marked as undefined.

Note: Evaluating an expression is like running a little one-line script, and even a little one-line script can do powerful things. An expression that changes a variable’s value, or calls a handler in your script, can be a valid expression and therefore can have side-effects each time it is evaluated.



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


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