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

NSDataLink

Inherits From:	NSObject

Conforms To:	appkit/NSDataLink.h

Initializing a Link

- (id)initLinkedToFile:(NSString *)filename	Initializes a new instance corresponding to filename.
- (id)initLinkedToSourceSelection:(NSSelection *)selection
managedBy:(NSDataLinkManager *)linkManager
supportingTypes:(NSArray *)newTypes	Initializes a newly allocated instance corresponding to a selection in the source document selection.  linkManager is the source document's link manager. newTypes is a set of  types that linkManager's delegate is willing to provide when a destination of the link requests the data described by selection.
- (id)initWithContentsOfFile:(NSString *)filename	Initializes a new instance from filename.
- (id)initWithPasteboard:(NSPasteboard *)pasteboard
	Initializes a new instance from pasteboard.

Exporting a Link

- (BOOL)saveLinkIn:(NSString *)directoryName	Saves the link in a filename provided by the user; the SavePanel's initial directory is in directoryName.
- (BOOL)writeToFile:(NSString *)filename	Writes the link into the file filename, returning NO if the file can't be written.
- (void)writeToPasteboard:(NSPasteboard *)pasteboard
	Writes the link onto the pasteboard pasteboard.

Information about the Link

- (NSDataLinkDisposition)disposition	Identifies the link's type.
- (NSDataLinkNumber)linkNumber	Returns the link's number.
- (NSDataLinkManager *)manager	Returns the link's manager.

Information about the Link's Source

- (NSDate *)lastUpdateTime	Returns the last time the link was updated.
- (BOOL)openSource	Opens the source document of the link and makes the source selection visible.
- (NSString *)sourceApplicationName	Returns the name of the application that owns the source document.
- (NSString *)sourceFilename	Returns the file name of the source document.
- (NSSelection *)sourceSelection	Returns the source selection.
- (NSArray *)types	Returns the types that the source document can provide.

Information about the Link's Destination

- (NSString *)destinationApplicationName	Returns the name of the application that owns the destination document.
- (NSString *)destinationFilename	Returns the file name of the destination document.
- (NSSelection *)destinationSelection	Returns the destination selection.

Changing the Link

- (BOOL)break	Breaks the link 
- (void)noteSourceEdited	Informs a source link that the data referred to by its source selection has changed.
- (void)setUpdateMode:(NSDataLinkUpdateMode)mode
	Sets the link's update mode to mode.
- (BOOL)updateDestination	Updates the data referred to by the link's destination selection with the contents referred to by the source selection.
- (NSDataLinkUpdateMode)updateMode	Returns the link's update mode.