Skip to main content

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 caseSensitiveDetermines whether text comparisons that don’t explicitly specify considering case or ignoring case are case sensitive or not; defaults to False.
the centuryCutoffControls which century two-digit years are assumed to belong to; defaults to the value of the defaultCenturyCutoff global property.
the itemDelimiterDefines the delimiter used for text items; defaults to the value of the defaultItemDelimiter global property.
the lineDelimiterDefines the strings that can separate line items when evaluating a line chunk expression; defaults to the value of the defaultLineDelimiter global property.
the listInsertionModeDetermines 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 numberFormatDefines the format for displaying numbers; defaults to the value of the defaultNumberFormat global property.
the wordDelimiterDefines the characters that separate words in text; defaults to the value of the defaultWordDelimiter global property.
the wordQuotesControls 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.

note

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 asTextLimitControls the maximum size of internally generated text representations of values.
the autoSaveDatabaseUpdatesDetermines whether updates to databases are saved automatically.
the backScriptsSpecial list of objects that receives messages after the target object as part of the message passing path.
the booleanComparisonControls how Boolean matches are made.
the breakpointsEnabledDetermines whether breakpoint commands are honored or ignored.
the characterFillerSpecifies the behavior when a container is extended by storing into a character position that lies beyond the end of the container's contents.
the clockFormatSet to 12 hour or 24 hour to control time formats.
the colorFormatThe format for displaying colors.
the defaultCenturyCutoffControls which century two-digit years are assumed to belong to if the centuryCutoff local property is not set.
the defaultDataFormatControls how values are represented when data is converted to text.
the defaultItemDelimiterDefines the default delimiter for text items.
the defaultLineDelimiterDefines the strings that can separate line items when evaluating a line chunk expression.
the defaultListInsertionModeControls how items behave when you add a list of items to another list.
the defaultNumberFormatSpecifies the default format for displaying numbers.
the defaultQuoteFormatSpecifies how values in the listFormat and the propertyListFormat global properties are quoted when converted to text.
the defaultStringEncodingControls the encoding used when reading and writing text strings in files.
the defaultWordDelimiterSpecifies the default delimiter characters for words.
the defaultWordQuotesDefines the default quote characters for word chunks.
the duplicatePropertyKeyModeControls how duplicate keys in property lists are handled.
the endValueThe value of the end constant, returned by iterators when they have no more values to return.
the evaluationContextControls how variables are evaluated in do, send, value() or merge() expressions (whether as local, global, or universal variables); defaults to Local.
the exceptionContains 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 folderNamesEndWithSlashDetermines whether folder names are returned with a slash at the end.
the frontScriptsSpecial list of objects that receives messages before the target object as part of the message passing path.
the lineFillerProvides 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 listFormatControls formatting of displayed lists.
the matchesCanOverlapDetermines whether pattern searches can overlap or be nested.
the namedColorsThe defined colors accessible by name.
the objectContainsItemDefinitionControls how operators or functions access keys and values within a property list.
the patternCharacterModeToggles between line mode and text mode (default) for pattern searches.
the patternTimeoutControls the maximum time taken on any single pattern search.
the predefinedVariablesContains a property list with the definitions of all predefined variables.
the propertyListFormatControls formatting of displayed property lists.
the readTimeoutSpecifies the maximum time (in seconds) that a read or open socket command will take before timing out.
the resultHistoryContains a list of the most recent the result values.
the resultHistoryLimitControls the maximum number of items in the resultHistory.
the shellCommandSets the command line shell to be used by the shell() function.
the strictFilesDetermines whether accessing the contents of a nonexistent file throws an exception or returns an empty value.
the strictPropertiesWhen set to True, accessing an undefined property of an object throws an exception rather than returning an empty value.
the strictVariablesWhen 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 suiteVariablesContains a property list of user-defined suite-wide variables.
the throwExceptionResultsDetermines whether an exception is thrown when an operation that sets the result returns an error.
the timeFormatA property list defining all of the available date/time formats.
the timeInputFormatA list of formats used in recognizing date and time values.
the treeFormatDefines the way XML trees are formatted.
the treeInputFormatSpecifies whether text nodes are joined when a change is made to a tree.
the umaskControls the access permissions for newly created files.
the URLCacheEnabledDetermines whether accessed URLs can be cached for later reuse; the default, True, allows caching.
the URLErrorLevelSpecifies the lowest URL status value that is treated as an error.
the URLTimeoutSpecifies the maximum time (in seconds) that a URL request will take before timing out.
the watchForScriptChangesDetermines if SenseTalk uses a cached copy of a script handler when it's called or if it checks the source for updates first.
the wordFillerSpecifies 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.

asTextThe 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.
asTextFormatIf 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.
objectTypeSetting an object’s objectType property identifies it as a particular type of object for the is a operator.
script propertiesSee Script Properties for a complete description.