Instance Method

setPropertyList:forType:

Sets the given property list as the representation for the specified type for the first item on the receiver.

Declaration

- (BOOL)setPropertyList:(id)plist forType:(NSPasteboardType)dataType;

Parameters

propertyList

The property list data to write to the pasteboard.

dataType

The type of property-list data in the propertyList parameter. The type must have been declared by a previous declareTypes:owner: message.

Return Value

YES if the data was written successfully, otherwise NO if ownership of the pasteboard has changed. Any other error raises an NSPasteboardCommunicationException.

Discussion

This method invokes setData:forType: with a serialized property list parameter.

See Also

Writing Data

clearContents

Clears the existing contents of the pasteboard

writeObjects:

Writes an array of objects to the receiver.

setData:forType:

Sets the given data as the representation for the specified type for the first item on the receiver.

setString:forType:

Sets the given string as the representation for the specified type for the first item on the receiver.