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: Programmer's Guide to MacApp / Part 2 - Working With MacApp


Chapter 14 -
Working With Scripting

This chapter includes recipes and sample code that demonstrate how to

For a detailed overview of MacApp's scripting support, see Chapter 6, "Scripting."

For related information, see "Recipe--Implementing a Recordable Drawing Command," beginning on page 375.

For more information on scripting, see Inside Macintosh: Interapplication Communication.


Chapter Contents
Overview
Creating an Object Specifier
Recipes--Scripting
Supporting Apple Events in Your Application--A General Outline
Recipe--Defining a Recordable Command Class
Override MakeAppleEvent in the TZoomInCommand Class
Recipe--Setting Object Properties With Apple Events
Identify the Property or Properties the Class Will Support
Define an 'aete' Resource
Mix in the MScriptableObject Class
Initialize MScriptableObject With an Object Model Class ID
Override GetObjectProperty and SetObjectProperty
If Necessary, Override GetSetPropertyInfo
Recipe--Supporting a Custom Apple Event
Identify the Custom Apple Event
Define an 'aete' Resource That Includes the Custom Event
Define an 'aedt' Resource for the Custom Event
Add the Mixin Class MScriptableObject
If Necessary, Override Certain Methods of MScriptableObject
Override DoScriptCommand to Handle the Custom Event
Recipe--Attaching a Script to Objects in Your Application
How MacApp Attaches the Script
What Happens When the Script Is Executed
Where You Go From Here
Recipe--Overriding the GetContainedObject Method
Define a Class That Mixes In the MScriptableObject Class
Provide an Override Version of the GetContainedObject Method
Recipe--Installing a Custom Subclass of TOSADispatcher
Define a Custom Subclass of TOSADispatcher
Register Your Custom Subclass
Call the InitUScripting Method of Your Custom Subclass

Previous Book Contents Book Index Next

© Apple Computer, Inc.
25 JUL 1996