Important: The information in this document is obsolete and should not be used for new development.
AECreateList
You can use theAECreateListfunction to create an empty descriptor list or AE record.
FUNCTION AECreateList (factoringPtr: Ptr; factoredSize: Size; isRecord: Boolean; VAR resultList: AEDescList): OSErr;
factoringPtr
A pointer to the data at the beginning of each descriptor that is the same for all descriptor records in the list. If there is no common data, or if you decide not to isolate the common data, specifyNILas the value of this parameter.factoredSize- The size of the common data. If there is no common data, or if you decide not to isolate the common data, the value of
factoredSizemust be 0. (See the description that follows for more information.)isRecord- A Boolean value that specifies the kind of list to create. If you set it to
TRUE, the Apple Event Manager creates an AE record. If you set it toFALSE, the Apple Event Manager creates a descriptor list.resultList- The descriptor list or AE record that the
AECreateListfunction creates.DESCRIPTION
TheAECreateListfunction creates an empty descriptor list or AE record. Your application is responsible for using theAEDisposeDescfunction to dispose of the resulting descriptor record when you no longer need it. You normally do this after receiving a result code from theAESendfunction.If you intend to use a descriptor list for a factored Apple event array, you must provide, in the
factoringPtrparameter, a pointer to the data shared by all items in the array and, in thefactoredSizeparameter, the size of the common data. The common data must be 4, 8, or more than 8 bytes in length because it always consists of (a) the descriptor type (4 bytes); (b) the descriptor type (4 bytes) and the size of each item's data (4 bytes); or (c) the descriptor type (4 bytes), the size of each item's data (4 bytes), and some portion of the data itself (1 or more bytes).If
AECreateListreturns a nonzero result code, it returns a null descriptor record unless the Apple Event Manager is not available because of limited memory.RESULT CODES
noErr 0 No error paramErr -50 Parameter error (value of handler pointer is NILor odd)memFullErr -108 Not enough room in heap zone SEE ALSO
For an example of the use ofAECreateList, see Listing 5-1 on page 5-9.For information about data types used with Apple event arrays, see "Apple Event Array Data Types" on page 4-57.