AEPutAttributeDesc(_:_:_:)
Adds a descriptor and a keyword to an Apple event as an attribute.
Declaration
func AEPutAttributeDesc(_ theAppleEvent: UnsafeMutablePointer<AppleEvent>!, _ theAEKeyword: AEKeyword, _ theAEDesc: UnsafePointer<AEDesc>!) -> OSErrParameters
- theAppleEvent:
A pointer to the Apple event to add an attribute to. See the Appleevent data type.
- theAEKeyword:
The keyword for the attribute to add. If the Apple event already includes an attribute with this keyword, the attribute is replaced.
Some keyword constants are described in 1542920 Keyword_attribute_constants.
See Aekeyword.
- theAEDesc:
A pointer to the descriptor to assign to the attribute. The descriptor type of the specified descriptor should match the defined descriptor type for that attribute. See Aedesc.
Return Value
A result code. See Result Codes.
Discussion
The AEPutAttributeDesc function takes a descriptor and a keyword and adds them to an Apple event as an attribute. If the descriptor type required for the attribute is different from the descriptor type of the descriptor, the Apple Event Manager attempts to coerce the descriptor into the required type, with one exception: the Apple Event Manager does not attempt to coerce the data for an address attribute, thereby allowing applications to use their own address types.
Version-Notes
Thread safe starting in OS X v10.2.