This page describes arguments and types used in TclÆ calls. For information on the assosciated ToolBox data types, see INSIDE MACINTOSH: Interapplication Communication.
There are a plethora of routines in these packages, and the majority of the parsing routines, in particular, will probably never be called directly. The ones most programmers will ever have need to call are listed below.
Note: If you do have reason to parse some sub-string of an
AEDesc, keep in mind that, with the exception of
tclAE::parse::event, all of the token and grammar parsers
operate in place, i.e., they are not passed a string, but the name of a
string and, when finished, the parsed material is removed from the start of
the string.
tclAEtclAE::buildAEBuild call.
tclAE::build <AEGizmos> [<descriptor parameters>]*
Hash key for new AEDesc.
Tcl wrapper for AEGizmos' AEBuild. (NOTE! 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.)
<AEGizmos> is a string in the syntax described by Jens
Alfke in the AEGizmos documentation. This is the syntax that Alpha has
always used and is the same that is returned by the Capture AE control
panel.
The general usage of descriptor parameters are discussed in the AEGizmos documentation. In TclÆ, each element in the descriptor parameter list is substituted into the AEGizmos strings as follows:
@', the
parameter must be the hash key for either an AEDesc
or an AESubDesc.
@@", the
parameter is taken as raw data to substitute into the descriptor.
The AEBuild parser will insist that the "@@"
be coerced to some type, e.g., "TEXT(@@)".
tclAE::print
Tcl wrapper for AEGizmos AEPrint call.
tclAE::print <theAEDesc>
AEGizmo string representation of theAEDesc.
theAEDesc is passed through AEGizmos' AEPrint.
This is the form historically returned by Alpha's AEBuild
call.
theAEDesc can be an AEDesc hash key, an
AESubDesc hash key, or an AEGizmo string (with optional
'@' parameters
(see tclAE::build)).
tclAE::PPCBrowserPPCBrowser.
tclAE::PPCBrowser <flags>
Tcl wrapper for ToolBox PPCBrowser call. Produces a TargetID and returns a hash key for later access.
Flags are:
-p <string> -l <string> -fc <list> -fn <list> tclAE::send
tclAE::send [<flags>] <app (address key|name|'creator')>
<aeclass> <aeeventID> [<event parameters>]*
-r
-q
-p
-t <timeout>
tclAE::targettclAE::target <option> ¿<arg> …?
<option>. The legal options are:
tclAE::target info <target> <array>
array' in
the current context, containing fields 'nameScript',
'name', 'portKindSelector', and
'locationKindSelector'. If 'portKindSelector' is
'ppcByCreatorAndType', there will be additional fields
'portCreator' and 'portType'. If
'portKindSelector' is 'ppcByString', there will
be an additional field 'portTypeStr'.
tclAE::target names
tclAE::target set <target> <keyword> <value>
keyword element of target to value.
tclAE::desctclAE::desc::coerce
Tcl wrapper for ToolBox AECoerceDesc call.
tclAE::desc::coerce <theAEDesc> <toType>
Hash key for new AEDesc.
Create a new AEDesc, casting the original theAEDesc to
toType.
theAEDesc can be an AEDesc hash key, an
AESubDesc hash key, or an AEGizmo string (with no
'@' parameters).
tclAE::desc::coerceData
Tcl wrapper for ToolBox AECoercePtr call.
tclAE::desc::coerceData <typeCode> <data> <toType>
Hash key for new AEDesc.
Create a new AEDesc, casting data from
typeCode to toType. Unlike the ToolBox call, it
doesn't really mean anything to pass a pointer in Tcl, so pass the data
directly.
tclAE::desc::countItems
Tcl wrapper for ToolBox AECountItems (or AEGizmos
AECountSubDescItems) call.
tclAE::desc::countItems <theAEDescList>
The number of items in <theAEDescList>.
Count items in <theAEDescList> or throw an error if
<theAEDescList> isn't a hash key for an
AEDescList, AERecord, or AESubDesc.
Note: theAEDescList cannot be an AEGizmo string.
tclAE::desc::create
Tcl wrapper for ToolBox AECreateDesc call.
tclAE::desc::create <typeCode> ¿data?
Hash key for new AEDesc.
Create a new AEDesc of type typeCode with
optional data.
tclAE::desc::createList
Tcl wrapper for ToolBox AECreateList call.
tclAE::desc::createList ¿isRecord?
Hash key for new AEDescList.
tclAE::desc::deleteItem
Tcl wrapper for ToolBox AEDeleteItem call.
tclAE::desc::deleteItem <theAEDescList> <item>
None.
Delete decriptor record at position <item> from
theAEDescList (or theAERecord).
In the ToolBox, AEDescLists are 1-based, but TclÆ
treats them as 0-based for consistency with Tcl lists.
tclAE::desc::deleteKey
Tcl wrapper for ToolBox AEDeleteKeyDesc call.
tclAE::desc::deleteKey <theAERecord> <theAEKeyword>
None.
Delete item with key <theAEKeyword> from
theAERecord.
tclAE::desc::dispose
Tcl wrapper for ToolBox AEDisposeDesc call.
tclAE::desc::dispose <theAEDesc>
None.
<theAEDesc> is disposed of and its hash key is deleted.
tclAE::desc::duplicate
Tcl wrapper for ToolBox AEDuplicateDesc call.
tclAE::desc::duplicate <theAEDesc>
Hash key for duplicate AEDesc.
<theAEDesc> is duplicated and the new AEDesc
is entered into the hash table.
theAEDesc can be an AEDesc hash key, an
AESubDesc hash key, or an AEGizmo string (with optional
'@' parameters
(see tclAE::build)).
tclAE::desc::getData
Tcl access for theAEDesc.dataHandle.
tclAE::desc::getData <theAEDesc> ¿desiredType? ¿typeCodePtr?
Text representation of theAEDesc.
<theAEDesc> is cast to desiredType (if
supplied). The data returned depends on the final type of the AEDesc:
'list' AEDescList items are
recursively cast to text and concatenated in a Tcl list.
'bool' 0
or 1.
AEDesc is cast to
'TEXT'. This puts most types of data in a form that's
useful to Tcl. Whether or not the coercion succeeds, the binary
data is returned.
If supplied, typeCodePtr is the name of a variable which will
be set to the coerced TypeCode of theAEDesc.
tclAE::desc::getKey
Tcl wrapper for ToolBox AEGetKeyDesc call.
tclAE::desc::getKey <theAERecord> <theAEKeyword> ¿desiredType?
Hash key pointing to key descriptor.
The key record specified by theAEKeyword is obtained from
theAERecord, optionally coerced to desiredType,
duplicated, and a new hash key is returned for it.
tclAE::desc::getKeyData
Tcl emulator for ToolBox AEGetKeyPtr call.
tclAE::desc::getKeyData <theAERecord> <theAEKeyword> ¿desiredType? ¿typeCodePtr?
Text representation of theAERecord key item.
The key record specified by theAEKeyword is obtained from
theAERecord. The resulting AEDesc is coerced to
desiredType (if supplied) and then processed as by tclAE::desc::getData.
If supplied, typeCodePtr is the name of a variable which will
be set to the coerced TypeCode of theAEDesc.
tclAE::desc::getKeyGizmo
Alternative Tcl wrapper for ToolBox AEGetKeyDesc call.
tclAE::desc::getKeyGizmo <theAERecord> <theAEKeyword> ¿desiredType?
AEGizmo string representation of the key descriptor.
The key record specified by theAEKeyword is obtained from
theAERecord, optionally coerced to desiredType,
and then passed through AEPrint.
tclAE::desc::getNth
Tcl wrapper for ToolBox AEGetNthDesc call.
tclAE::desc::getNth <theAEDescList> <index> ¿desiredType? ¿theAEKeyword?
Hash key pointing to item descriptor.
The item record specified by item is obtained from
theAEDescList. The resulting AEDesc is optionally
coerced to desiredType, duplicated, and a new hash key is
returned for it.
In the ToolBox, AEDescLists are 1-based, but TclÆ
treats them as 0-based for consistency with Tcl lists.
If supplied, theAEKeywordPtr is the name of a variable which
will be set to the keyword of the specified descriptor record if
theAEDescList is an AERecord or
'****' otherwise.
tclAE::desc::getNthData
Tcl emulator for ToolBox AEGetNthPtr call.
tclAE::desc::getNthData <theAEDescList> <index> ¿desiredType? ¿theAEKeyword? ¿typeCodePtr?
Text representation of the data from the descriptor record at position
item in theAEDescList.
The item record specified by item is obtained from
theAEDescList. The resulting AEDesc is coerced to
desiredType (if supplied) and then processed as by tclAE::desc::getData.
In the ToolBox, AEDescLists are 1-based, but TclÆ
treats them as 0-based for consistency with Tcl lists.
If supplied, theAEKeywordPtr is the name of a variable which
will be set to the keyword of the specified descriptor record if
theAEDescList is an AERecord or
'****' otherwise.
If supplied, typeCodePtr is the name of a variable which will
be set to the descriptor type of the returned descriptor record.
tclAE::desc::getNthGizmo
Alternative Tcl wrapper for ToolBox AEGetNthDesc call.
tclAE::desc::getNthGizmo <theAEDescList> <index> ¿desiredType? ¿theAEKeyword?
AEGizmo string representation of the item descriptor.
The item record specified by item is obtained from
theAEDescList. The resulting AEDesc is optionally
coerced to desiredType, and then passed through
AEPrint.
In the ToolBox, AEDescLists are 1-based, but TclÆ
treats them as 0-based for consistency with Tcl lists.
If supplied, theAEKeywordPtr is the name of a variable which
will be set to the keyword of the specified descriptor record if
theAEDescList is an AERecord or
'****' otherwise.
tclAE::desc::getType
Tcl access for theAEDesc.descriptorType.
tclAE::desc::getType <theAEDesc>
The DescType of theAEDesc.
The FourCharCode type of theAEDesc is cast to a
string and returned.
tclAE::desc::listDescriptors
List the active AEDesc hash keys.
tclAE::desc::listDescriptors
List of AEDesc hash keys.
The hash keys for the active AEDescs are compiled and returned
in a Tcl list.
tclAE::desc::putNth
Tcl wrapper for ToolBox AEPutDesc call.
tclAE::desc::putNth <theAEDescList> <index> <theAEDesc>
None.
The item record specified by item in
theAEDescList is replaced with theAEDesc.
In the ToolBox, AEDescLists are 1-based, but TclÆ
treats them as 0-based for consistency with Tcl lists.
theAEDesc can be an AEDesc hash key, an
AESubDesc hash key, or an AEGizmo string (with optional
'@' parameters
(see tclAE::build)).
tclAE::desc::putNthData
Tcl emulator for ToolBox AEPutPtr call.
tclAE::desc::putNthData <theAEDescList> <index> <typeCode> <data>
None.
The item record specified by item in
theAEDescList is replaced with a new descriptor record
composed from data cast to typeCode.
In the ToolBox, AEDescLists are 1-based, but TclÆ
treats them as 0-based for consistency with Tcl lists.
tclAE::desc::putKey
Tcl wrapper for ToolBox AEPutKeyDesc call.
tclAE::desc::putKey <theAERecord> <theAEKeyword> <theAEDesc>
None.
The key record specified by theAEKeyword in
theAERecord is replaced with theAEDesc.
theAEDesc can be an AEDesc hash key, an
AESubDesc hash key, or an AEGizmo string (with optional
'@' parameters
(see tclAE::build)).
Tcl emulator for ToolBox AEPutKeyPtr call.
tclAE::desc::putKeyData <theAERecord> <theAEKeyword> <typeCode> <data>
None.
The key record specified by theAEKeyword in
theAERecord is replaced with a new descriptor record
composed from data cast to typeCode.
tclAE::subdesctclAE::subdesc::dispose
Dispose of an AESubDesc.
tclAE::subdesc::dispose <theAESubDesc>
None.
<theAESubDesc> is deleted and its hash key is removed
from the AESubDesc hash table.
Note: The underlying AEDesc is not
disposed of. That would be Bad.
Note: This Tcl proc has no analogue in the
AEGizmos API. AESubDescs are not normally allocated, so they
don't need to be disposed of. This proc is needed because of
the way hashes work in Tcl.
tclAE::subdesc::fromDesc
Tcl wrapper for AEGizmos AEDescToSubDesc call.
tclAE::subdesc::fromDesc <theAEDesc>
Hash key for new AESubDesc.
Create a new AESubDesc, pointing at the supplied
AEDesc.
tclAE::subdesc::getBasicType
Tcl wrapper for AEGizmos AEGetSubDescBasicType call.
tclAE::subdesc::getBasicType <theAESubDesc>
Basic type of theAESubDesc.
This proc returns the same value as
tclAE::getSubDescType, with one exception; if the
sub-descriptor is a coerced record, the type returned is
'reco'.
tclAE::subdesc::getData
Tcl wrapper for AEGizmos AEGetSubDescData call.
tclAE::subdesc::getData <theAESubDesc>
Text representation of theAESubDesc key item.
The descriptor record pointed at by theAESubDesc is processed
as by tclAE::desc::getData.
tclAE::subdesc::getKey
Tcl wrapper for AEGizmos AEGetKeySubDesc call.
tclAE::subdesc::getKey <theAESubDesc> <theAEKeyword> ¿inPlace?
Hash key for new AESubDesc.
The key record specified by theAEKeyword is obtained from
theAERecord belonging to theAESubDesc.
If inPlace is true (default false), the new AESubDesc
replaces theAESubDesc and is returned with the same hash key.
tclAE::subdesc::getKeyData
Convenience access to data of AEGetKeySubDesc.
tclAE::subdesc::getKeyData <theAESubDesc> <theAEKeyword>
Text representation of theAESubDesc key item.
The key record specified by theAEKeyword is obtained from
theAERecord pointed at by theAESubDesc. The
resulting AEDesc is processed as by tclAE::desc::getData.
tclAE::subdesc::getNth
Tcl wrapper for AEGizmos AEGetNthSubDesc call.
tclAE::subdesc::getNth <theAESubDesc> <index> ¿keyIfAnyPtr? ¿inPlace?
Hash key for new AESubDesc.
The descriptor record at position index is obtained from
theAEDescList belonging to theAESubDesc.
In the ToolBox, AEDescLists are 1-based, but TclÆ
treats them as 0-based for consistency with Tcl lists.
If supplied, keyIfAnyPtr is the name of a variable which
will be set to the keyword of the specified descriptor record if
theAEDescList is an AERecord or
'****' otherwise.
If inPlace is true (default false), the new AESubDesc
replaces theAESubDesc and is returned with the same hash key.
tclAE::subdesc::getNthData
Convenience access to data of AEGetNthSubDesc.
tclAE::subdesc::getNthData <theAESubDesc> <theAEKeyword>
Text representation of theAESubDesc key item.
The descriptor record at position index is obtained from
theAEDescList belonging to theAESubDesc. The
resulting AEDesc is processed as by tclAE::desc::getData.
In the ToolBox, AEDescLists are 1-based, but TclÆ
treats them as 0-based for consistency with Tcl lists.
If supplied, keyIfAnyPtr is the name of a variable which
will be set to the keyword of the specified descriptor record if
theAEDescList is an AERecord or
'****' otherwise.
tclAE::subdesc::getType
Tcl wrapper for AEGizmos AEGetSubDescType call.
tclAE::subdesc::getType <theAESubDesc>
Descriptor type of theAESubDesc.
This returns the descriptor type code of the sub-descriptor.
tclAE::subdesc::isListOrRecord
Tcl wrapper for AEGizmos AESubDescIsListOrRecord call.
tclAE::subdesc::isListOrRecord <theAESubDesc>
True if basic type of theAESubDesc is 'list' or
'reco'.
tclAE::subdesc::listSubDescriptors
List the active AESubDesc hash keys.
tclAE::subdesc::listSubDescriptors
List of AESubDesc hash keys.
The hash keys for the active AESubDescs are compiled and returned
in a Tcl list.
tclAE::subdesc::toDesc
Tcl wrapper for AEGizmos AESubDescToDesc call.
tclAE::subdesc::toDesc <theAESubDesc> ¿desiredType?
Hash key for new AEDesc.
Copies a sub-descriptor into a brand new AEDesc. The
resulting descriptor will be coerced to the desired type; if you don't want
any coercion, use '****' as the desired type.
tclAE::buildtclAE::build::eventtclAE::build::event <args>
tclAE::build::result'----') from
tclAE::build::event.
tclAE::build::result <args>
tclAE::build::ListtclAE::build::List <list> ¿-as <type>? ¿-untyped?
tclAE::build::hexdtclAE::build::booltclAE::build::longtclAE::build::TEXTtclAE::build::alistclAE::build::fsstclAE::build::enumtclAE::build::<type> <value>
tclAE::build::startupDisktclAE::build::startupDisk
tclAE::build::throwtclAE::build::throw <args>
tclAE::build::usernametclAE::build::username