Quick Reference: Local Properties and Global Properties
Local properties and global properties in SenseTalk let you set or change behaviors system-wide. For instance, you can set the numerical format for time or date values, and you can change the way SenseTalk scripts interact with files and file system objects. There are also a few special properties that affect the way an object is treated by SenseTalk.
You can see lists of the local, global, and special properties below. SenseTalk also includes a set of global properties specific to working with the Eggplant Functional application, which are described on the following pages:
Local Properties
SenseTalk local properties govern behavior locally within a handler. If they have not yet been set to a specific value within the current handler, they will have a default value as indicated for each property. When the value of one of these properties is set in a handler, it has that value only within the local handler. Handlers that called the local handler, or which are called by it, are not affected.
the caseSensitive | Determines whether text comparisons that don’t explicitly specify considering case or ignoring case are case sensitive or not; defaults to False . |
the centuryCutoff | Controls which century two-digit years are assumed to belong to; defaults to the value of the defaultCenturyCutoff global property. |
the itemDelimiter | Defines the delimiter used for text items; defaults to the value of the defaultItemDelimiter global property. |
the lineDelimiter | Defines the strings that can separate line items when evaluating a line chunk expression; defaults to the value of the defaultLineDelimiter global property. |
the listInsertionMode | Determines whether a list inserted into another is nested in the other list or is inserted item by item; defaults to the value of the defaultListInsertionMode global property. |
the numberFormat | Defines the format for displaying numbers; defaults to the value of the defaultNumberFormat global property. |
the wordDelimiter | Defines the characters that separate words in text; defaults to the value of the defaultWordDelimiter global property. |
the wordQuotes | Controls how quotes are treated in word chunks; defaults to the value of the defaultWordQuotes global property. |
Global Properties
The following SenseTalk properties are global in scope. They can be changed by any handler at any time, and after they are changed their new value will be in effect from that point forward in all handlers.
Most global properties have a standard initial setting at the start of script execution, as indicated in the discussion of that property. These standard values can be overridden by settings in the user defaults database for the host application, using the property name prefixed by ST
. For example, the shellCommand
property would be set using the name STShellCommand
in the user defaults.
the asTextLimit | Controls the maximum size of internally generated text representations of values. |
the autoSaveDatabaseUpdates | Determines whether updates to databases are saved automatically. |
the backScripts | Special list of objects that receives messages after the target object as part of the message passing path. |
the booleanComparison | Controls how Boolean matches are made. |
the breakpointsEnabled | Determines whether breakpoint commands are honored or ignored. |
the characterFiller | Specifies the behavior when a container is extended by storing into a character position that lies beyond the end of the container's contents. |
the clockFormat | Set to 12 hour or 24 hour to control time formats. |
the colorFormat | The format for displaying colors. |
the defaultCenturyCutoff | Controls which century two-digit years are assumed to belong to if the centuryCutoff local property is not set. |
the defaultDataFormat | Controls how values are represented when data is converted to text. |
the defaultItemDelimiter | Defines the default delimiter for text items. |
the defaultLineDelimiter | Defines the strings that can separate line items when evaluating a line chunk expression. |
the defaultListInsertionMode | Controls how items behave when you add a list of items to another list. |
the defaultNumberFormat | Specifies the default format for displaying numbers. |
the defaultQuoteFormat | Specifies how values in the listFormat and the propertyListFormat global properties are quoted when converted to text. |
the defaultStringEncoding | Controls the encoding used when reading and writing text strings in files. |
the defaultWordDelimiter | Specifies the default delimiter characters for words. |
the defaultWordQuotes | Defines the default quote characters for word chunks. |
the duplicatePropertyKeyMode | Controls how duplicate keys in property lists are handled. |
the endValue | The value of the end constant, returned by iterators when they have no more values to return. |
the evaluationContext | Controls how variables are evaluated in do , send , value() or merge() expressions (whether as local, global, or universal variables); defaults to Local . |
the exception | Contains information about an exception thrown in the context of the latest try block; otherwise, is empty. |
the folder , the directory | Returns the current working folder in the file system. |
the folderNamesEndWithSlash | Determines whether folder names are returned with a slash at the end. |
the frontScripts | Special list of objects that receives messages before the target object as part of the message passing path. |
the lineFiller | Provides the line delimiter to use when a container is extended by storing into a line number position that lies beyond the end of the container's contents. |
the listFormat | Controls formatting of displayed lists. |
the matchesCanOverlap | Determines whether pattern searches can overlap or be nested. |
the namedColors | The defined colors accessible by name. |
the objectContainsItemDefinition | Controls how operators or functions access keys and values within a property list. |
the patternCharacterMode | Toggles between line mode and text mode (default) for pattern searches. |
the patternTimeout | Controls the maximum time taken on any single pattern search. |
the predefinedVariables | Contains a property list with the definitions of all predefined variables. |
the propertyListFormat | Controls formatting of displayed property lists. |
the readTimeout | Specifies the maximum time (in seconds) that a read or open socket command will take before timing out. |
the resultHistory | Contains a list of the most recent the result values. |
the resultHistoryLimit | Controls the maximum number of items in the resultHistory . |
the shellCommand | Sets the command line shell to be used by the shell() function. |
the strictFiles | Determines whether accessing the contents of a nonexistent file throws an exception or returns an empty value. |
the strictProperties | When set to True , accessing an undefined property of an object throws an exception rather than returning an empty value. |
the strictVariables | When set to True , accessing the value of a local variable that has not been declared or stored into throws an exception instead of returning the variable’s name. |
the suiteVariables | Contains a property list of user-defined suite-wide variables. |
the throwExceptionResults | Determines whether an exception is thrown when an operation that sets the result returns an error. |
the timeFormat | A property list defining all of the available date/time formats. |
the timeInputFormat | A list of formats used in recognizing date and time values. |
the treeFormat | Defines the way XML trees are formatted. |
the treeInputFormat | Specifies whether text nodes are joined when a change is made to a tree. |
the umask | Controls the access permissions for newly created files. |
the URLCacheEnabled | Determines whether accessed URLs can be cached for later reuse; the default, True , allows caching. |
the URLErrorLevel | Specifies the lowest URL status value that is treated as an error. |
the URLTimeout | Specifies the maximum time (in seconds) that a URL request will take before timing out. |
the watchForScriptChanges | Determines if SenseTalk uses a cached copy of a script handler when it's called or if it checks the source for updates first. |
the wordFiller | Specifies the behavior when a container is extended by storing into a word position that lies beyond the end of the container's contents. |
Special Properties
There are several object properties with special meaning to SenseTalk. Some of these properties are “hidden” in the sense that they are not listed by the keys or values functions and will not appear in the default text representation of an object, but they can be directly accessed as properties of an object.
These special properties affect the way an object is treated by SenseTalk. These properties show up as ordinary properties of your object but have special meaning.
asText | The asText property, if set for an object, is used as the text representation of the object if it does not handle an “asText” function message. |
asTextFormat | If an object has neither an “asText” function handler nor an asText property, SenseTalk checks for an asTextFormat property. If this property is set for an object, its value is used as a format string to generate the text representation of the object using the merge function. |
objectType | Setting an object’s objectType property identifies it as a particular type of object for the is a operator. |
script properties | See Script Properties for a complete description. |