Important: The information in this document is obsolete and should not be used for new development.
The Scripting Size Resource
If your application handles the Get AETE event, you must provide a scripting size resource. A scripting size resource is a resource of type'scsz'
that provides information about an application's capabilities for use by scripting components. It also allows your application to specify preferences for the sizes of the portion of your application's heap used by a scripting component for its application-specific heap and stack.Listing 8-5 shows the resource type declaration in Rez format for the
'scsz'
resource.Listing 8-5 Resource type declaration for the
'scsz'
resource
type 'scsz' { boolean dontReadExtensionTerms, /*if application needs */ readExtensionTerms; /* Get AETE event*/ boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; boolean reserved; /*memory sizes are in bytes; 0 means use default*/ unsigned longint minStackSize; /*minimum stack size*/ unsigned longint preferredStackSize; /*preferred stack size*/ unsigned longint maxStackSize; /*maximum stack size*/ unsigned longint minHeapSize; /*minimum heap size*/ unsigned longint preferredHeapSize; /*preferred stack size*/ unsigned longint maxHeapSize; /*maximum heap size*/ };The data for an'scsz'
resource consists of the following items:
If you specify 0 for any of the fields that specify memory size or number of script IDs, the scripting component uses its own default values for those fields.
- Flags that specify Boolean values:
- Whether the scripting component should (readExtensionTerms) or shouldn't (dontReadExtensionTerms) read the application's terminology information directly from its
'aete'
resource. If the application is not running, this flag allows a scripting component to determine whether it should read the application's terminology information without sending it a Get AETE event.- The following 15 bits are reserved for future use. Their values must be set to
reserved
.
- The minimum size for the portion of the application's heap used by the scripting component's application-specific stack
- The preferred size for the portion of the application's heap used by the scripting component's application-specific stack
- The maximum size for the portion of the application's heap used by the scripting component's application-specific stack
- The minimum size for the portion of the application's heap used by the scripting component's application-specific heap
- The preferred size for the portion of the application's heap used by the scripting component's application-specific heap
- The maximum size for the portion of the application's heap used by the scripting component's application-specific heap
The AppleScript component provides a function,
ASInit
, that allows your application to initialize the component with desired values for memory sizes or number of script IDs. If your application doesn't callASInit
, the AppleScript component initializes itself using either the values specified in the application's'scsz'
resource or, for those values not provided by the'scsz'
resource, default values provided by the AppleScript component. For more information aboutASInit
, see "Initializing AppleScript" on page 10-80.