Scrap Manager Versus the Pasteboard Manager

If your application still uses the Scrap Manager written for classic Mac OS, Apple encourages you to update your code to use the Pasteboard Manager instead.

The Pasteboard Manager is available in Mac OS X v10.3 and later.

Table A-1 lists the Carbon Scrap Manager functions and their Pasteboard Manager equivalents.

Table A-1  Scrap Manager functions and their Pasteboard Manager replacements

Scrap Manager function

Pasteboard Manager equivalent

Comments

GetScrapByName

PasteboardCreate

GetCurrentScrap

PasteboardCreate

Specify the kPasteboardClipboard constant in PasteboardCreate to indicate you want the Clipboard.

GetScrapFlavorFlags

PasteboardGetItemFlavorFlags

GetScrapFlavorSize

No equivalent

Data is now handed to you as a CFData object, so you no longer need to allocate memory when receiving pasteboard data.

GetScrapFlavorData

PasteboardCopyItemFlavorData

ClearCurrentScrap

PasteboardClear

Specifically, clear the Clipboard pasteboard.

ClearScrap

PasteboardClear

PutScrapFlavor

PasteboardPutItemFlavor

GetScrapFlavorCount

PasteboardCopyItemFlavors

You obtain the flavors as a CFArray, and you can call CFArrayGetCount to obtain the number of flavors.

GetScrapFlavorInfoList

PasteboardCopyItemFlavors

CallInScrapPromises

PasteboardResolvePromises

SetScrapPromiseKeeper

PasteboardSetPromiseKeeper

Promise keeper UPP functions

No equivalent

UPPs not required for Mac OS X.

Promise keeper callback function

Promise keeper callback function

The parameter list is different for Pasteboard Manager callbacks.