Important: The information in this document is obsolete and should not be used for new development.
GetIndexedCollectionItemInfo
You use theGetIndexedCollectionItemInfo
function to obtain information about a specific collection item given the item's collection index.
OSErr GetIndexedCollectionItemInfo (Collection source, long index, CollectionTag *tag, long *id, long *itemSize, long *attributes);
source
- A reference to the collection object containing the item you want to obtain information about.
index
- The collection index associated with the item you want to obtain information about.
tag
- A pointer to a collection tag. On return, the collection tag associated with the specified item. You may specify the constant
dontWantTag
for this parameter if you do not want to determine the specified item's collection tag.id
- A pointer to a
long
value. On return, the collection ID associated with the specified item. You may specify the constantdontWantId
for this parameter if you do not want to determine the specified item's collection ID.itemSize
- A pointer to a
long
value. On return, this value indicates the size in bytes of the data associated with the specified item. You may specify the constantdontWantSize
for this parameter if you do not want to determine the specified item's data size.attributes
- A pointer to a
long
value. On return, this value contains a copy of the attributes associated with the specified item. You may specify the constantdontWantAttributes
for this parameter if you do not want a copy of the item's attributes.DESCRIPTION
TheGetIndexedCollectionItemInfo
function allows you to obtain information about a specific collection item in the collection referenced by thesource
parameter. You specify the collection item by specifying the item's collection index in theindex
parameter.This function returns information in the
tag
,id
,itemSize
, andattributes
parameters:
- If you provide a pointer in the
tag
parameter, the function uses this parameter to return the collection tag of the specified item.- If you provide a pointer in the
id
parameter, the function uses this parameter to return the collection ID of the specified item.- If you provide a pointer in the
itemSize
parameter, the function uses this parameter to return the size in bytes of the variable-length data associated with the specified collection item.- If you provide a pointer in the
attributes
parameter, the function uses this parameter to return a copy of the attributes associated with the specified collection item.
RESULT CODES
collectionIndexRangeErr -5752 Index is out of range. SEE ALSO
For information about collection items and their associated collection tags, collection IDs, and variable-length data, see "Collection Items" beginning on page 5-8. For information about collection indexes, see "Methods of Identifying Collection Items" beginning on page 5-11.For examples of this function, see "Determining the Collection Index of an Item" beginning on page 5-19, "Determining the Size of an Item's Variable-Length Data" beginning on page 5-22, and "Getting and Setting the Attributes of an Item" beginning on page 5-24.
To obtain information about a collection item using the collection tag and collection ID to specify the item, use the
GetCollectionItemInfo
function, described in the previous section.To obtain information about a collection item using the collection tag and tag list position to specify the item, use the
GetTaggedCollectionItemInfo
function, described in the next section.