Important: The information in this document is obsolete and should not be used for new development.
SetCollectionItemInfo
You use theSetCollectionItemInfo
function to edit the attributes of a specific collection item given the item's collection tag and collection ID.
OSErr SetCollectionItemInfo(Collection target, CollectionTag tag, long id, long whichAttributes, long newAttributes);
target
- A reference to the collection object containing the item whose attributes you want to edit.
tag
- The collection tag associated with the item whose attributes you want to edit.
id
- The collection ID associated with 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
TheSetCollectionItemInfo
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 tag and collection ID in thetag
andid
parameters.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
collectionItemNotFoundErr -5751 Can't locate item. 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 obtain information about a collection item using the collection index to specify the item, use the
SetIndexedCollectionItemInfo
function, described in the next section.