(Preliminary Documentation) Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSPasteboard 

Inherits From:	NSObject 

Declared In:	appkit/NSPasteboard.h 

Creating and Releasing an NSPasteboard Object

+ (NSPasteboard *)generalPasteboard	Returns the general NSPasteboard.
+ (NSPasteboard *)pasteboardWithName:(NSString *)name	
	Returns the NSPasteboard named name.
+ (NSPasteboard *)pasteboardWithUniqueName	Returns a uniquely named NSPasteboard.
- (void)releaseGlobally	Releases the NSPasteboard and its resources in the pasteboard server.

Getting Data in Different Formats 

+ (NSPasteboard *)pasteboardByFilteringData:(NSData *)data 
ofType:(NSString *)type	Returns a NSPasteboard that contains data of all types filterable from data of type type.
+ (NSPasteboard *)pasteboardByFilteringFile:(NSString *)filename
	Returns a NSPasteboard that contains data of all types filterable from filename.
+ (NSPasteboard *)pasteboardByFilteringTypesInPasteboard:(NSPasteboard *)pboard
	Returns a NSPasteboard that contains data of all types filterable from pboard.
+ (NSArray *)typesFilterableTo:(NSString *)type	Returns an array specifying all types type can be filtered to.

Referring to a Pasteboard by Name 

- (NSString *)name	Returns the NSPasteboard's name.

Writing Data 

- (int)declareTypes:(NSArray *)newTypes	Sets the data types and owner of the NSPasteboard and
owner:(id)newOwner		returns the new change count.
- (int)addTypes:(NSArray *)newTypes	Adds data types to the NSPasteboard and declares a new
owner:(id)newOwner		owner.  Returns the new change count or 0 in case of error.
- (BOOL)setData:(NSData *)data forType:(NSString *)dataType
	Writes data of type dataType to the pasteboard server from data.  Returns YES if the data is successfully written; otherwise returns NO.
- (BOOL)setPropertyList:(id)pList forType:(NSString *)dataType
	Writes data of type dataType to the pasteboard server from pList.  Returns YES if the data is successfully written; otherwise returns NO.
- (BOOL)writeFileContents:(NSString *)filename	Writes data from filename to the pasteboard server.

Discerning Types 

- (NSArray *)types	Returns an array of the NSPasteboard's data types.
- (NSString *)availableTypeFromArray:(NSArray *)types
	Returns first type in types that matches a type declared in the receiver.

Reading Data 

- (int)changeCount	Returns the NSPasteboard's change count.
- (NSData *)dataForType:(NSString *)dataType	Returns NSPasteboard data using the type specified by dataType.
- (id)propertyListForType:(NSString *)dataType	Returns a property list object using the type specified by dataType.
- (NSString *)readFileContentsType:(NSString *)type 
toFile:(NSString *)filename	Reads data of type type representing a file's contents from the NSPasteboard and writes it to filename.  Returns the actual name of the file that was written.

Methods Implemented by the Owner 

- (void)pasteboard:(NSPasteboard *)sender provideData:(NSString *)type
	Implemented to write promised data to sender as type.
- (void)pasteboardChangedOwner:(NSPasteboard *)sender
	Notifies prior owner that ownership changed.