MonobjcMonobjc Documented Class Library
SetStringForType Method (string, dataType)
NamespacesMonobjc.AppKitNSPasteboardSetStringForType(NSString, NSString)

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

Original signature is '- (BOOL)setString:(NSString *)string forType:(NSString *)dataType'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual bool SetStringForType(
	NSString string,
	NSString dataType
Public Overridable Function SetStringForType ( _
	string As NSString, _
	dataType As NSString _
) As Boolean
virtual bool SetStringForType(
	NSString^ string, 
	NSString^ dataType
string (NSString)
The string to write to the pasteboard.
dataType (NSString)
The type of string data. 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)