Carbon


AEPutAttributeDesc

Header: AEDataModel.h Carbon status: Supported

Adds a descriptor record and a keyword to an Apple event as an attribute.

OSErr AEPutAttributeDesc (
    AppleEvent *theAppleEvent, 
    AEKeyword theAEKeyword, 
    const AEDesc *theAEDesc
);
theAppleEvent

A pointer to the Apple event to add an attribute to.

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 “Keyword Attribute Constants”.

theAEDesc

A pointer to the descriptor record to assign to the attribute. The descriptor type of the specified descriptor record should match the defined descriptor type for that attribute.

function result

A result code.

DISCUSSION

The AEPutAttributeDesc function takes a descriptor record 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 record, the Apple Event Manager attempts to coerce the descriptor record 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.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)