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: Object Model

image

A scriptable application can define classes, roughly comparable to the “things” that constitute its world. (For example, iTunes defines a playlist class and a track class, and the Finder defines a folder class and a file class.) Classes can have properties and elements, whose value type can be a class. Thus, in theory, for a given application, there is a hierarchical relationship of ownership—of containment—amongst its classes. (For example, in iTunes, a playlist “has” tracks, and in the Finder, a folder “has” files.)

In theory, this relationship can be expressed as a “tree”, a hierarchical structure starting with the application itself, and containing every object in the application. Indeed, this tree is vital to your use of AppleScript to communicate with a scriptable application, because it is why you are able to refer to an object in the first place. (For example, you can speak to the Finder of file 1 of folder "Mannie" because the Finder “has” folders and a folder “has” files.) This tree of the objects that you can refer to is the application’s object model.

Script Debugger exposes an application’s object model in two places:

  • In a Dictionary window, the diagram drawer shows you the application’s containment hierarchy as a tree.

  • In a Dictionary window and in other places, an application’s actual objects are displayed hierarchically through an explorer view.

I say “in theory” because in reality things are not so simple. The containment hierarchy is describing what’s possible, not what’s real, and therefore infinite recursions and circularities can result when you try to express it as a simple tree. For example, in the Finder, in real life there could never be an infinite depth of folder containment. In the containment hierarchy diagram, however, you can keep opening “folder” entries to get “folder” entries inside them, and so on, forever and ever (or until you get bored), just because as a theoretical matter, it’s always true that a folder can contain a folder. If this confuses you, and you’d rather see the object model as it exists in reality, use the explorer.



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


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