MonobjcMonobjc Documented Class Library
SetDataForType Method (data, dataType)
NamespacesMonobjc.AppKitNSPasteboardSetDataForType(NSData, NSString)

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

Original signature is '- (BOOL)setData:(NSData *)data forType:(NSString *)dataType'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual bool SetDataForType(
	NSData data,
	NSString dataType
Public Overridable Function SetDataForType ( _
	data As NSData, _
	dataType As NSString _
) As Boolean
virtual bool SetDataForType(
	NSData^ data, 
	NSString^ dataType
data (NSData)
The data to write to the pasteboard.
dataType (NSString)
The type of data in the data 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.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)