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 10 - Scripting Components / Scripting Components Reference
AppleScript Component Routines / Getting and Setting Styles for Source Data


ASSetSourceStyles

You can use the ASSetSourceStyles function to set the script format styles used by the AppleScript component to display scripts.

FUNCTION ASSetSourceStyles (scriptingComponent: ComponentInstance;
                            sourceStyles: STHandle): OSAError;
scriptingComponent
A component instance created by a prior call to the Component Manager function OpenDefaultComponent or OpenComponent (see page 10-4).
sourceStyles
A handle to a style element array defined by the TextEdit data type TEStyleTable that defines the nine styles used for different kinds of AppleScript terms. The style for each kind of term should be identified according to the index constants listed for ASGetSourceStyles on page 10-81.
DESCRIPTION
The ASSetSourceStyles function sets the script format styles used to display scripts. If you pass a NIL handle in the sourceStyles parameter, the AppleScript component uses its default styles.

After you have set the script format styles, you must dispose of the style element array you used to specify them.

RESULT CODES
noErr0No error
errOSASystemError-1750General scripting system error
badComponentInstance$80008001Invalid component instance
SEE ALSO
For information about the TEStyleTable array, see Inside Macintosh: Text.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996