Container Properties
Both scripts stored in text files, and objects created dynamically by your scripts as they run can have properties. Most of these properties can be modified by a script. Any modifiable property of an object can be treated as a container.
Script Properties
Script files may also define additional properties in a “properties declaration”. These are treated as modifiable custom properties of the object at runtime, which can be manipulated as containers.
Custom Properties
Any object can also have custom properties assigned to it. All such properties are modifiable, and may therefore be treated as containers, as shown in this example:
put new object into sam -- create an object with no properties
put "Sam Adams" into property "name" of sam -- set the name
put 36 into the age of sam -- set the age property to 36
add one to sam's age -- increment sam's age
put "uel" after word 1 of sam's name
put sam.name & ", age " & sam.age -- Samuel Adams, age 37
Objects and their properties, including a number of special properties not mentioned here, are described in detail in Lists and Property Lists, and Objects and Messages.
Local and Global Properties
In addition to properties of objects, there are also a number of properties that do not belong to any one object, but rather to the SenseTalk runtime environment itself. These include “local” properties that apply within the scope of a single handler, such as the numberFormat, the itemDelimiter, and the caseSensitive, and also “global” properties that apply across all handlers during a run, such as the folder, the defaultNumberFormat, the defaultItemDelimiter, the shellCommand, and many others. All of these properties can be treated as containers (just like a variable) for changing their values.
Local and global properties are accessed by using the word the followed by the name of the property. The word the is required to distinguish a local or global property name from a variable name.
Syntax:
the localOrGlobalPropertyName
For additional information about local and global properties, as well as complete lists of the available properties, see Local and Global Properties.