|
Explorer View
|
|
Explorer views appear in many places in Script Debugger’s interface. For example:
This page describes what is shown in in an explorer view. A further page discusses what you can do in an explorer view.
An explorer view is an outline, a hierarchy. To expand or contract the hierarchy beneath a line:
- Click that line’s disclosure triangle (or select that line and press the Right Arrow or Left Arrow key).
Here are the kinds of things shown in an explorer view:
Element collections are shown in bold with plural names and disclosure triangles. The “value” displays the element count. Expand an element collection to see the individual elements in the collection. Each individual element’s “value” is a reference to that element (along with information about its name, if available). In the illustration above (from the iTunes explorer), the user has opened the application’s sources collection, revealing source 1 (whose name is “Library”), and from there has drilled on down through the element hierarchy to reveal file track 1 of playlist 6 of source 1. The sources, playlists, and file tracks entries are all element collections.
Objects are shown with disclosure triangles as well. The “value” is a reference to the object, as returned by the application, and is badged with the application’s icon (to indicate that it’s an object belonging to that application). Expand the object reference to see the object’s elements and properties. Above, the user has opened file track 1 of playlist 6 of source 1, revealing its artworks elements collection, its album property, and so forth.
Lists and Records are shown with disclosure triangles too. The “value” displays the item count (but a Dictionary preference can change this). Expand the entry to see the individual items of the list or record. Below is a picture showing an example (from the Finder’s explorer).
- Script Objects are shown with disclosure triangles too. (A common place to see this is in the variables pane.) Expand a script object’s listing to see its script properties and its top-level script objects. The illustration below is from a script containing a property
x and a script object ss, which itself has a property x and a script property sss, which also has a property x.
- Other datatypes are shown as individual lines without triangles. The value is shown as AppleScript would display it. So, in the above illustration of iTunes’s explorer, the
album property of this object (file track 1 of playlist 6 of source 1) is a string, “Stokes Eastern Birds”.
Actually, the album property is Unicode text, and Script Debugger lets you know this with the “UTF XVI” badge that appears next to it. Text badges you may see are:
 | Unicode text (UTF-16) | [Common] |
 | UTF-8 | [Rare] |
 | Styled text | [Rare] |
 | International text | [Rare] |
Also, if a value is a valid file reference, it is badged with the icon of the corresponding item on disk.
Read on to learn what else you can do in an explorer, and how to generate separate viewer windows so you can focus on the details of particular values.