Important: The information in this document is obsolete and should not be used for new development.
SetIndexedCollectionItemInfo
You use theSetIndexedCollectionItemInfo
function to edit the attributes of a specific collection item given the item's collection index.
OSErr SetIndexedCollectionItemInfo(Collection target, long index, long whichAttributes, long newAttributes);
target
- A reference to the collection object containing the item whose attributes you want to edit.
index
- The collection index of the item whose attributes you want to edit.
whichAttributes
- A mask indicating which attributes you want to edit.
newAttributes
- A long word containing the new settings for the attributes.
DESCRIPTION
TheSetIndexedCollectionItemInfo
function allows you to edit the attributes of a specific collection item in the collection referenced by thetarget
parameter. You specify the collection item by specifying the item's collection index in theindex
parameter.This function copies bit values from the
newAttributes
parameter to the attributes associated with the specified item.This function uses the
whichAttributes
parameter to determine which bits to copy. For every bit in thewhichAttributes
parameter, this function takes one of two actions:
The
- If the bit is set, this function copies the value of the corresponding bit from the
newAttributes
parameter into the corresponding bit of the attributes associated with the specified item.- If the bit is not set, the corresponding bit of the specified item's attributes remains unchanged.
whichAttributes
parameter allows you to change the values of specific bits in the specified item's attributes without affecting the values of other bits.RESULT CODES
collectionIndexRangeErr -5752 Index is out of range. SEE ALSO
For information about collection attributes, see "Collection Attributes" beginning on page 5-9.For attribute-related data types and enumerations, see page 5-49 through page 5-53.
For examples of this function, see "Getting and Setting the Attributes of an Item" beginning on page 5-24.
To edit the attributes of collection item using the collection tag and collection ID (rather than the collection index) to specify the item, use the
SetCollectionItemInfo
function, described in the previous section.To examine the attributes of a collection item, use the functions described in "Getting Information About a Collection Item" beginning on page 5-76.