Important: The information in this document is obsolete and should not be used for new development.
GetNewCollection
Use theGetNewCollectionutility function to read a collection in from a collection ('cltn') resource.
Collection GetNewCollection(short collectionID);
collectionID- The resource ID associated with the collection resource from which you want to create the new collection object.
- function result
- A reference to the new collection object.
DESCRIPTION
This function searches the current resource file path for a collection ('cltn') resource with the resource ID specified by thecollectionIDparameter. If it finds such a resource, this function creates a new collection object, initializes it with the information stored in the resource, and returns a reference to it as the function result.If this function does not find a collection resource with the specified resource ID, it returns
nilas the function result.You can use the
MemErrorandResErrorfunctions to check for other errors after calling this function.RESULT CODES
memFullErr -108 Can't allocate memory. resNotFound -192 Resource not found. SEE ALSO
For an example using this function, see "Reading a Collection From a Collection Resource" beginning on page 5-44.For information about collection resources, see "The Collection Resource" beginning on page 5-102.
For more information about resources in general, see the "Resource Manager" chapter of Inside Macintosh: More Macintosh Toolbox.