This page describes Tcl® calls for handling received AppleEvents and AppleEvent descriptor type coercion requests. For information on the associated ToolBox calls and data types, see INSIDE MACINTOSH: Interapplication Communication.



Handling AppleEvent Descriptor Coercions


tclAE::installCoercionHander

Tcl wrapper for ToolBox AEInstallCoercionHandler call.

SYNOPSIS

tclAE::installCoercionHander fromType toType coercionHandlerProc

RESULT

None.

DESCRIPTION

This call allows Tcl procs to act as AEDesc coercion handlers.


tclAE::getCoercionHander

Tcl wrapper for ToolBox AEGetCoercionHandler call.

SYNOPSIS

tclAE::getCoercionHander fromType toType

RESULT

Name of Tcl coercion proc.

DESCRIPTION

The Tcl® coercion hash table is searched for the proc mapped by fromType and toType.

If the AEM has a registered coercion handler that is not a Tcl proc, the result will be empty, but no error is thrown. Tell me how you want this to work!!!

Throws OSErr -1717 (errAEHandlerNotFound) if there is no entry in the coercion hash table.


tclAE::removeCoercionHander

Tcl wrapper for ToolBox AERemoveCoercionHandler call.

SYNOPSIS

tclAE::getCoercionHander fromType toType coercionHandlerProc

RESULT

None.

DESCRIPTION

The Tcl® coercion hash table is searched for the proc mapped by fromType and toType and matched with coercionHandlerProc. Although the fromType and toType parameters would be sufficient to identify the handler to be removed, providing the coercionHandlerProc parameter is a safeguard to ensure that you remove the correct handler.

Throws OSErr -1717 (errAEHandlerNotFound) if there is no matching entry in the Tcl®Õs coercion hash table.


Handling AppleEvents


tclAE::installEventHander

Tcl wrapper for ToolBox AEInstallEventHandler call.

SYNOPSIS

tclAE::installEventHander aeclass aeeventID eventHandlerProc

RESULT

None.

DESCRIPTION

This call allows a Tcl proc to act as an AppleEvent handler.


tclAE::getEventHander

Tcl wrapper for ToolBox AEGetEventHandler call.

SYNOPSIS

tclAE::getEventHander aeclass aeeventID

RESULT

Name of Tcl AppleEvent handler proc.

DESCRIPTION

The Tcl® event handler hash table is searched for the proc mapped by aeclass and aeeventID.

If the AEM has an event handler that is not a Tcl proc, the result will be empty, but no error is thrown. Tell me how you want this to work!!!

Throws OSErr -1717 (errAEHandlerNotFound) if there is no entry in the event handler hash table.


tclAE::removeEventHander

Tcl wrapper for ToolBox AEGetEventHandler call.

SYNOPSIS

tclAE::getCoercionHander aeclass aeeventID eventHandlerProc

RESULT

None.

DESCRIPTION

The Tcl® event handler hash table is searched for the proc mapped by this aeclass and aeeventID and matched with eventHandlerProc. Although the aeclass and aeeventID parameters would be sufficient to identify the handler to be removed, providing the eventHandlerProc parameter is a safeguard to ensure that you remove the correct handler.

Throws OSErr -1717 (errAEHandlerNotFound) if there is no matching entry in the coercion hash table.


Copyright © 1999Ð2000 Jonathan E. Guyer
All rights reserved.

Last modified Saturday, December 9, 2000 9:04:53 PM