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: Text /
Chapter 6 - Script Manager / Script Manager Reference
Routines / Directly Accessing International Resources


ClearIntlResourceCache

The ClearIntlResourceCache procedure clears the application's international resources cache, which contains the resource ID numbers of the string-manipulation ('itl2') and tokens ('itl4') resources for the current script.

PROCEDURE ClearIntlResourceCache;
DESCRIPTION
At application launch, the script management system sets up an international resources cache for the application. The cache contains the resource ID numbers of the string-manipulation and tokens resources for all enabled scripts.

If you provide your own string manipulation or tokens resource to replace the default for a particular script, call ClearIntlResourceCache at launch to ensure that your supplied resource is used instead of the script system's 'itl2' or 'itl4' resource.

The current default ID numbers for a script system's 'itl2' and 'itl4' resources are stored in its script variables. You can read and modify these values with the GetScriptVariable and SetScriptVariable functions using the selectors smScriptSort (for the 'itl2' resource) and smScriptToken (for the 'itl4' resource). Before calling ClearIntlResourceCache, you should set the script's default ID number to the ID of the resource that you are supplying.

If the international resources selection flag is TRUE, the ID numbers of your supplied resources must be in the system script range. Otherwise, the IDs must be in the range of the current script.

IMPORTANT
If you use the SetScriptVariable function to change the
value of the 'itl2' or 'itl4' resource ID and then call ClearIntlResourceCache to flush the cache, be sure to
restore the original resource ID before your application quits.
SPECIAL CONSIDERATIONS
ClearIntlResourceCache may move memory; your application should not call this procedure at interrupt time.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996