Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 6 - Expressions / Script Properties


Scope of Script Properties

Like the scope of a variable, the scope of a script property determines where else in a script you may refer to the same property ID. The scope of a property in turn depends on where you declare it.

You can declare a property at the top level of a script or at the top level of a script object. If you declare it at the top level of a script, a property identifier is visible throughout the script. If you declare it at the top level of a script object, a property identifier is visible only within that script object. After declaring a property, you can use the same identifier as a separate variable only if you first declare it as a local variable.

For detailed information and examples of the use of properties in subroutines, see "Scope of Script Variables and Properties," which begins on page 252.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996