Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Interapplication Communication /
Chapter 8 - Apple Event Terminology Resources / Reference to Apple Event Terminology Resources


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.

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 call ASInit, 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 about ASInit, see "Initializing AppleScript" on page 10-80.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996