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

Glossary: Dictionary

image

AppleScript’s real power and purpose lies in communicating with scriptable applications, which provide powers that AppleScript lacks. In order that you, the AppleScript programmer, may harness its powers, a scriptable application extends the vocabulary of the AppleScript language. This extended vocabulary is called a scriptable application’s terminology. A dictionary is the means by which a scriptable application or scripting addition lets you (and AppleScript) know how it extends AppleScript’s vocabulary.

The dictionary translates between two forms of terminology — the English-like terms, which you use in your script, and the raw Apple event codes, which AppleScript uses to construct Apple events when communicating with a scriptable application.

When you write a script using English-like terms, the dictionary is used to translate them into raw Apple events to be sent to scriptable applications.

In a compiled script file, the raw Apple events are encoded directly into the bytecode. In order to open the compiled script file and decompile it, the dictionary is used to translate the raw Apple events back into English-like terms. This is why AppleScript may have trouble opening a script in the absence of a required dictionary.

Under certain circumstance, a compiled script may open but display some of its raw Apple events (as four-letter codes surrounded by chevrons) instead of the English-like terminology. And, as a power user feature, Script Debugger lets you deliberately display raw Apple events instead of English-like terminology.

image

At any given moment in a script there are several sets of terminology visible at once — variable names used in the script, terms from the dictionary of the targeted application, terms from scripting additions, terms from AppleScript’s own dictionary. If the script chooses its terms unwisely, or if the visible dictionaries use the same terminology in different ways, terminology clash can occur. Terminology clash can result in a script that won’t compile or run, or it might result in a script that compiles and runs, but behaves mysteriously.

Script Debugger helps you track down terminology clash by letting you view raw Apple event codes in your script, in the Apple Event Log window, and in dictionaries, and by letting you search for terminology in all visible dictionaries at once.

If you use an application with an ‘aete’ dictionary that allows the dictionary to be extended through plug-ins (such as QuarkXPress or InDesign), read the discussion of Script Debugger’s dictionary caching mechanism.



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


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