Apple event type mappings

Overview

[TO DO: finish updating this chapter]

Standard Apple event descriptor types are mapped to and from Foundation/AppleEventBridge classes as follows:

AppleScript typeDescriptor typeAEBSymbol nameCocoa class
(no data)typeNullnullNSNull
booleantypeBooleanbooleanNSNumber (equiv. CFBoolean)
integertypeSInt32integerNSNumber
realtypeIEEE64BitFloatingPointfloatNSNumber
text [1]typeUnicodeTextunicodeTextNSString
listtypeAEListlistNSArray
recordtypeAERecordrecordNSDictionary
datetypeLongDateTimedateNSDate
when the corresponding terminology is available, otherwise they are unpacked as AEMType, AEMEnum, and AEMProperty respectively, e.g.:

[AEMType typeWithCode: 'abcd']
[AEMEnum enumWithCode: 'xyz ']

Other types

The Apple Event Manager defines many other AE types whose names and codes are defined by AppleEventBridge for completeness. A few of these types are of occasional interest to users, the rest can simply be ignored. In most cases, values of these types will be represented by NSAppleEventDescriptor instances as AppleEventBridge doesn't automatically convert them.