This page describes Tcl® calls that manipulate AppleEvent descriptors. For information on the associated ToolBox calls and data structures, see INSIDE MACINTOSH: Interapplication Communication.



AppleEvent Descriptors


tclAE::build

Tcl wrapper for AEGizmosÕ AEBuild call.

SYNOPSIS

tclAE::build AEGizmo [descriptor parameters]*

RESULT

Hash key for new AEDesc.

DESCRIPTION

Build an AEDesc from an AEGizmo string (plus optional descriptor parameters).

Your application is responsible for using the tclAE::disposeDesc function to dispose of the resulting descriptor record when you no longer need it.

Alpha users: This is not to be confused with Alpha's old (and still existing) AEBuild call. Pete combined the functions of AEBuild and AESend, but it now makes sense to distinguish them.


tclAE::coerceData

Tcl wrapper for ToolBox AECoercePtr call.

SYNOPSIS

tclAE::coerceData typeCode data toType

RESULT

Hash key for new AEDesc.

DESCRIPTION

Create a new AEDesc, casting data from typeCode to toType. Unlike the ToolBox call, the data is passed directly, rather than in a pointer.

Your application is responsible for using the tclAE::disposeDesc function to dispose of the resulting descriptor record when you no longer need it.


tclAE::coerceDesc

Tcl wrapper for ToolBox AECoerceDesc call.

SYNOPSIS

tclAE::coerceDesc anyAEDesc toType

RESULT

Hash key for new AEDesc.

DESCRIPTION

Create a new AEDesc, casting the original AEDesc to toType.

If anyAEDesc is an AEGizmo, it cannot take '@' parameters.

Your application is responsible for using the tclAE::disposeDesc function to dispose of the resulting descriptor record when you no longer need it.


tclAE::createDesc

Tcl wrapper for ToolBox AECreateDesc call.

SYNOPSIS

tclAE::createDesc typeCode [data]

RESULT

Hash key for new AEDesc.

DESCRIPTION

Create a new AEDesc of type typeCode with optional data.

Your application is responsible for using the tclAE::disposeDesc function to dispose of the resulting descriptor record when you no longer need it.


tclAE::disposeDesc

Tcl wrapper for ToolBox AEDisposeDesc call.

SYNOPSIS

tclAE::disposeDesc theAEDesc

RESULT

None.

DESCRIPTION

The specified AEDesc is disposed of and its hash key is deleted.


tclAE::duplicateDesc

Tcl wrapper for ToolBox AEDuplicateDesc call.

SYNOPSIS

tclAE::duplicateDesc anyAEDesc

RESULT

Hash key for duplicate AEDesc.

DESCRIPTION

The descriptor record specified by anyAEDesc is duplicated and the new AEDesc is entered into the hash table.

Your application is responsible for using the tclAE::disposeDesc function to dispose of the resulting descriptor record when you no longer need it.


tclAE::getData

Tcl read access for theAEDesc.dataHandle, including coercion.

SYNOPSIS

tclAE::getData theAEDesc [desiredType] [typeCodePtr]

RESULT

The data held in theAEDesc.

DESCRIPTION

theAEDesc is cast to desiredType (if supplied). Pass '????' in desiredType to force the return of raw binary data.


tclAE::getDescType

Tcl read access for theAEDesc.descriptorType.

SYNOPSIS

tclAE::getDescType theAEDesc

RESULT

The DescType of theAEDesc.


tclAE::listDescriptors

List the active AEDesc hash keys.

SYNOPSIS

tclAE::listDescriptors

RESULT

List of AEDesc hash keys.

DESCRIPTION

The hash keys for the active descriptor records are compiled and returned in a Tcl list.


tclAE::print

Tcl wrapper for AEGizmos AEPrint call.

SYNOPSIS

tclAE::print anyAEDesc

RESULT

AEGizmo string representation of anyAEDesc.

DESCRIPTION

anyAEDesc is passed through AEGizmosÕ AEPrint.

Alpha note: This is the form historically returned by the obsolete AEBuild call.


tclAE::replaceDescData

Tcl wrapper for Carbon AEReplaceDescData call and/or Tcl write access for theAEDesc.typeCode and theAEDesc.dataHandle.

SYNOPSIS

tclAE::replaceDescData theAEDesc typeCode data

RESULT

None.

DESCRIPTION

The data and typeCode in theAEDesc are replaced.


tclAE::setDescType

Tcl write access for theAEDesc.descriptorType.

SYNOPSIS

tclAE::setDescType theAEDesc toType

RESULT

None.

DESCRIPTION

The DescType of theAEDesc is set to toType.


AppleEvent Descriptor Lists


tclAE::countItems

Tcl wrapper for ToolBox AECountItems (or AEGizmos AECountSubDescItems) call.

SYNOPSIS

tclAE::countItems anyAEDescList

RESULT

The number of items in anyAEDescList.

DESCRIPTION

Count items in anyAEDescList. anyAEDescList cannot be an AEGizmo string.


tclAE::createList

Tcl wrapper for ToolBox AECreateList call.

SYNOPSIS

tclAE::createList [isRecord]

RESULT

Hash key for new AEDescList.

DESCRIPTION

If isRecord is present and true, an AERecord is created, otherwise an AEDescList.

Your application is responsible for using the tclAE::disposeDesc function to dispose of the resulting descriptor record when you no longer need it.


tclAE::deleteItem

Tcl wrapper for ToolBox AEDeleteItem call.

SYNOPSIS

tclAE::deleteItem theAEDescList index

RESULT

None.

DESCRIPTION

Delete descriptor record at position index from theAEDescList. All subesequent descriptor records will then move up one item.


tclAE::getNthData

Tcl emulator for ToolBox AEGetNthPtr call.

SYNOPSIS

tclAE::getNthData theAEDescList index [desiredType] [keyIfAnyPtr] [typeCodePtr]

RESULT

The data from the descriptor record at position index in theAEDescList.

DESCRIPTION

The descriptor record specified by index is obtained from theAEDescList. The resulting AEDesc is then processed as by tclAE::getData.


tclAE::getNthDesc

Tcl wrapper for ToolBox AEGetNthDesc call.

SYNOPSIS

tclAE::getNthDesc theAEDescList index [desiredType] [keyIfAnyPtr]

RESULT

AEDesc hash key for the item descriptor.

DESCRIPTION

The item record specified by index is obtained from theAEDescList. The resulting AEDesc is optionally coerced to desiredType, duplicated, and a new hash key is returned for it.

Your application is responsible for using the tclAE::disposeDesc function to dispose of the resulting descriptor record when you no longer need it.


tclAE::getNthGizmo

Alternative Tcl wrapper for ToolBox AEGetNthDesc call.

SYNOPSIS

tclAE::getNthGizmo theAEDescList index [desiredType] [keyIfAnyPtr]

RESULT

AEGizmo string representation of the item descriptor.

DESCRIPTION

The descriptor record specified by index is obtained from theAEDescList. The resulting AEDesc is optionally coerced to desiredType, and then passed through AEPrint.


tclAE::putData

Tcl emulator for ToolBox AEPutPtr call.

SYNOPSIS

tclAE::putData theAEDescList index typeCode data

RESULT

None.

DESCRIPTION

The descriptor record specified by index in theAEDescList is replaced with a new descriptor record composed from data cast to typeCode.


tclAE::putDesc

Tcl wrapper for ToolBox AEPutDesc call.

SYNOPSIS

tclAE::putDesc theAEDescList index anyAEDesc

RESULT

None.

DESCRIPTION

The descriptor record specified by index in theAEDescList is replaced with a copy of anyAEDesc.


AppleEvent Descriptor Records


tclAE::deleteKey

Tcl wrapper for ToolBox AEDeleteKeyDesc call.

SYNOPSIS

tclAE::deleteKey theAERecord theAEKeyword

RESULT

None.

DESCRIPTION

Delete the keyword-specified descriptor record specified by theAEKeyword from theAERecord.


tclAE::getKeyData

Tcl emulator for ToolBox AEGetKeyPtr call.

SYNOPSIS

tclAE::getKeyData theAERecord theAEKeyword [desiredType] [typeCodePtr]

RESULT

The data from the keyword-specified descriptor record from theAERecord.

DESCRIPTION

The keyword-specified descriptor record specified by theAEKeyword is obtained from theAERecord. The resulting AEDesc is then processed as by tclAE::getData.


tclAE::getKeyDesc

Tcl wrapper for ToolBox AEGetKeyDesc call.

SYNOPSIS

tclAE::getKeyDesc theAERecord theAEKeyword [desiredType]

RESULT

New AEDesc.

DESCRIPTION

The keyword-specified descriptor record specified by theAEKeyword is obtained from theAERecord, optionally coerced to desiredType, duplicated, and a new hash key is returned for it.

Your application is responsible for using the tclAE::disposeDesc function to dispose of the resulting descriptor record when you no longer need it.


tclAE::getKeyGizmo

Alternative Tcl wrapper for ToolBox AEGetKeyDesc call.

SYNOPSIS

tclAE::getKeyGizmo theAERecord theAEKeyword [desiredType]

RESULT

AEGizmo string representation of the key descriptor.

DESCRIPTION

The keyword-specified descriptor record specified by theAEKeyword is obtained from theAERecord, optionally coerced to desiredType, and then passed through AEPrint.


tclAE::putKeyData

Tcl emulator for ToolBox AEPutKeyPtr call.

SYNOPSIS

tclAE::putKeyData theAERecord theAEKeyword typeCode data

RESULT

None.

DESCRIPTION

The keyword-specified descriptor record specified by theAEKeyword in theAERecord is replaced with a new descriptor record composed from data cast to typeCode.


tclAE::putKeyDesc

Tcl wrapper for ToolBox AEPutKeyDesc call.

SYNOPSIS

tclAE::putKeyDesc theAERecord theAEKeyword anyAEDesc

RESULT

None.

DESCRIPTION

The keyword-specified descriptor record specified by theAEKeyword in theAERecord is replaced with a copy of anyAEDesc.


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

Last modified Monday, November 13, 2000 10:22:09 AM