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 4 - Responding to Apple Events / Reference to Responding to Apple Events
Application-Defined Routines /


MyCoerceDesc

A coercion handler that accepts a descriptor record has the following syntax:

FUNCTION MyCoerceDesc (theAEDesc: AEDesc; toType: DescType;
                       handlerRefcon: LongInt;
                       VAR result: AEDesc): OSErr;
theAEDesc
The descriptor record that contains the data to be coerced.
toType
The desired descriptor type for the resulting descriptor record.
handlerRefcon
A reference constant that is stored in the coercion dispatch table entry for the handler and passed to the handler by the Apple Event Manager whenever the handler is called.
result
The resulting descriptor record.
DESCRIPTION
Your coercion handler should coerce the data in the descriptor record to the desired descriptor type and return the resulting data in the descriptor record specified by the result parameter. Your handler should return an appropriate result code.

SEE ALSO
For more information, see "Writing and Installing Coercion Handlers" on page 4-41.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996