Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Interapplication Communication /
Chapter 5 - Creating and Sending Apple Events / Reference to Creating and Sending Apple Events
Routines for Creating and Sending Apple Events / Adding Items to Descriptor Lists


AEPutArray

You can use the AEPutArray function to put the data for an Apple event array into any descriptor list.

FUNCTION AEPutArray (theAEDescList: AEDescList; 
                     arrayType: AEArrayType; 
                     arrayPtr: AEArrayDataPointer; 
                     itemType: DescType; 
                     itemSize: Size; itemCount: LongInt): OSErr;
theAEDescList
The descriptor list into which to put the Apple event array. If there are any items already in the descriptor list, they are replaced.
arrayType
The Apple event array type to be created. This is specified by one of the following constants: kAEDataArray, kAEPackedArray, kAEHandleArray, kAEDescArray, or kAEKeyDescArray.
arrayPtr
A pointer to the buffer containing the array.
itemType
For arrays of type kAEDataArray, kAEPackedArray, or kAEHandleArray, the descriptor type of array items to be created.
itemSize
For arrays of type kAEDataArray or kAEPackedArray, the size (in bytes) of the array items to be created.
itemCount
The number of elements in the array.
DESCRIPTION
When you use AEPutArray to put an array into a factored descriptor list, each array item must include the data that is common to all the descriptor records in the list. The Apple Event Manager automatically isolates the data you specified in the call to AECreateList that is common to all the elements of the array.

RESULT CODES
noErr0No error
memFullErr-108Not enough room in heap zone
errAEWrongDataType-1703Wrong descriptor type
errAENotAEDesc-1704Not a valid descriptor record
SEE ALSO
For information about data types and constants used with AEPutArray, see "Apple Event Array Data Types" on page 4-57.

For more information about creating descriptor lists for Apple event arrays, see the description of AECreateList on page 5-29.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996