Important: The information in this document is obsolete and should not be used for new development.
GetIndexedCollectionTag
Each collection object contains a number of distinct collection tags. You can use theGetIndexedCollectionTagfunction to examine a specific collection tag contained in a collection.
OSErr GetIndexedCollectionTag(Collection source, long whichTag, CollectionTag *tag);
source- The collection from which to obtain a specific collection tag.
whichTag- The position of the desired collection tag in the source collection's list of distinct collection tags.
tag- A pointer to a collection tag. On return, the collection tag that lies at the specified position in the list of distinct collection tags contained in the source collection.
DESCRIPTION
TheGetIndexedCollectionTagfunction returns in thetagparameter the collection tag that lies at the position specified by thewhichTagparameter in the list of distinct collection tags contained in the collection referenced by thesourceparameter.By sequentially incrementing the value of the
whichTagparameter from 1 to the result of theCountCollectionTagsfunction, you can use this function to determine every collection tag contained in a collection.RESULT CODES
collectionIndexRangeErr -5752 Index is out of range. SEE ALSO
For information about collection tags, see "Collection Items" beginning on page 5-8. For information about data types related to collection tags, see the section "Collection Tags" beginning on page 5-49.For an example of this function, see "Examining the Collection Tags of a Collection" beginning on page 5-35.
To determine the total number of distinct collection tags contained in a collection, use the
CountCollectionTagsfunction, described in the previous section.