Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Environment and Utilities /
Chapter 5 - Collection Manager / Collection Manager Reference
Functions / Cloning and Copying Collection Objects


CopyCollection

You use the CopyCollection function to create a copy of an existing collection.

Collection CopyCollection(Collection source, Collection target);
source
A reference to the collection object you want to copy.
target
A reference to a collection object to contain the copied collection items. You may provide nil for this parameter to request that the Collection Manager create a new collection object to hold the copied information.
function result
A reference to the collection object containing the copied information.
DESCRIPTION
The CopyCollection function copies all of the information (except the owner count and exception procedure) from the collection object referenced by the source parameter into the collection object referenced by the target parameter.

If you specify nil for the target parameter, this function creates a new collection object to copy the information into. (This function does not return an error code; it returns nil if it cannot create a new collection object.)

In either case, this function returns a reference to the collection object containing the copied information.

SEE ALSO
For general information about QuickDraw GX objects, see the chapter "Introduction to QuickDraw GX Objects" in Inside Macintosh: QuickDraw GX Objects.

For examples using this function, see "Cloning or Copying a Collection" on page 5-14.

To clone a collection object, use the CloneCollection function, which is described on page 5-56.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996