Contents

setPropertyList(_:forType:)

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

Declaration

func setPropertyList(_ plist: Any, forType dataType: NSPasteboard.PasteboardType) -> Bool

Parameters

  • plist:

    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

true if the data was written successfully, otherwise false 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

Related Documentation

Writing data