Carbon


AEPutArray

Header: AEDataModel.h Carbon status: Supported

Puts the data for an Apple event array into a descriptor list, replacing any previous records in the list.

OSErr AEPutArray (
    AEDescList *theAEDescList, 
    AEArrayType arrayType, 
    const AEArrayData *arrayPtr, 
    DescType itemType, 
    Size itemSize, 
    SInt32 itemCount
);
Parameter descriptions
theAEDescList

A pointer to the descriptor list to put the Apple event array into. If there are any descriptor records already in the descriptor list, they are replaced. If the array type is kAEKeyDescArray, theAEDescList must point to an AERecord; otherwise, it can point to either an AEDescList or an AERecord.

If you pass a pointer to a factored descriptor list, created by calling the AECreateList function, each array item in the array pointed to by the arrayPtr parameter must include the data that is common to all the descriptor records in the list. The Apple Event Manager automatically isolates the common data you specified in the call to AECreateList. A factored descriptor list is described in the Discussion section.

arrayType

The Apple event array type to create. Pass a value specified by one of the constants described in “Data Array Constants”.

arrayPtr

A pointer to a buffer, local variable, or other storage location, created and disposed of by your application, that contains the array to put into the descriptor list.

itemType

For arrays of type kAEDataArray, kAEPackedArray, or kAEHandleArray, the descriptor type of the array items to create. Use one of the constants described in “Descriptor Type Constants”, such as typeLongInteger. You don’t need to specify an item type for arrays of type kAEDescArray or kAEKeyDescArray because the data is already stored in descriptor records which contain a descriptor type.

itemSize

For arrays of type kAEDataArray or kAEPackedArray, the size (in bytes) of the array items to create. You don’t need to specify an item size for arrays of type kAEDescArray, kAEKeyDescArray, or kAEHandleArray because their descriptor records (though not the data they point to) have a known size.

itemCount

The number of elements in the array.

function result

A result code.

DISCUSSION

A factored descriptor list is one in which the Apple Event Manager automatically isolates the data that is common to all the elements of the list so that the common data only appears in the list once. To create a factored descriptor list, you call the AECreateList function and specify the data that is common to all elements in the descriptor array.

AVAILABILITY

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


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)