Protocol

NSPasteboardReading

A set of methods that defines the interface for initializing an object from a pasteboard.

Declaration

@protocol NSPasteboardReading

Overview

The Cocoa framework classes NSString, NSAttributedString, NSURL, NSColor, NSSound, NSImage, and NSPasteboardItem implement this protocol. You can make your custom class conform to this protocol so that you can read instances from a pasteboard using the readObjectsForClasses:options: method of NSPasteboard.

Topics

Initializing the Pasteboard

- initWithPasteboardPropertyList:ofType:

Initializes an instance with a property list object and a type string.

Reading From the Pasteboard

+ readableTypesForPasteboard:

Returns an array of UTI strings of data types the receiver can read from the pasteboard and be initialized from.

Required.

+ readingOptionsForType:pasteboard:

Returns options for reading data of a specified type from a given pasteboard.

Required.

NSPasteboardReadingOptions

Options to specify how data on the pasteboard should be interpreted to initialize an object in initWithPasteboardPropertyList:ofType:.

See Also

Pasteboard

NSPasteboard

An object that transfers data to and from the pasteboard server.

NSPasteboardItem

An item on a pasteboard.

NSPasteboardWriting

A set of methods that defines the interface for retrieving a representation of an object that can be written to a pasteboard.

NSPasteboardItemDataProvider

A set of methods implemented by the data provider of a pasteboard item to provide the data for a particular UTI type.