This is NSDataLink.rtf in view mode; [Download] [Up]
paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc. All Rights Reserved. s4 li100 fi0 ri1007 ql f0 b fs36 fs100 fs36 NSDataLink pard s14 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSObject fs20 fs28 s7 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding, NSCopying fi0 NSObject (NSObject) fs20 fs28 s8 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSDataLink.h fs20 fs28 pard s19 li100 fi0 ri1007 ql f0 b fs28 fs20 fs28 Class Description fs14 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 An NSDataLink object (or i data linki0 ) defines a single link between a selection in a source document and a dependent, dynamically updated selection in a destination document. fs16 fs28 A data link is typically created when linkable data is copied to the pasteboard. First, an NSSelection object describing the data is created. Then a link to that selection is created using b initLinkedToSourceSelection:managedBy:supportingTypes:b0 . The link can then be written to the pasteboard using b writeToPasteboard:b0 . Usually, after the link has been written to the pasteboard (or saved to a file using b writeToFile:b0 ) the link is freed because it'27s generally of no further use to the source application. fs16 fs28 Once the data and link have been written to the pasteboard, they can be added to a destination document by an object that can respond to a message to Paste and Link. The object responding to this message will paste the data as usual. The destination application will then read the link from the pasteboard using b initWithPasteboard:b0 , create an NSSelection describing the linked data within the destination document, and will add the link by sending b addLink:at:b0 to the document'27s NSDataLinkManager object (also known as a i data link manageri0 or simply i link manageri0 ). fs16 fs28 When the link is added to the destination document'27s link manager, it becomes a i destination linki0 . At that time, the data link'27s object establishes a connection with the source document'27s link manager, which automatically creates a i source linki0 in the source application; the source link refers to the source selection. fs16 fs28 A link that isn'27t managed by a link manager is a i broken linki0 . (Both source and destination links have link managers.) All links are broken links when they are created. Links can be explicitly broken (ensuring that they cause no updates) using the b breakb0 method. Broken links (that aren'27t former source links) can be hooked up as destination links with the b addLink:at:b0 method. The disposition of a link (destination, source, or broken) can be retrieved with the b dispositionb0 method. Most of the messages defined by the NSDataLink class can be sent to a link of any disposition, but some only make sense when sent to a link with a specific disposition; these are so noted in their method descriptions. fs16 fs28 Links of all dispositions (except links to files) maintain an NSSelection object referring to the link'27s selection in the source document; this selection is returned by the b sourceSelectionb0 method. Links directly to files represent entire files rather than selections in a document; these links are created with b initLinkedToFile:b0 and have no source selection. fs16 fs28 Source and destination links also maintain an NSSelection describing the location of the data in the destination document; this selection is returned by the b destinationSelectionb0 method. fs16 fs28 See the NSSelection class description for more information on NSSelection objects. fs16 fs28 pard s19 li100 fi0 ri1007 ql f0 b fs24 fs28 Initializing a Link fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (id)b initLinkedToFile:b0 (NSString *)i filenamei0 tab Initializes a new instance corresponding to i filenamei0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (id)b initLinkedToSourceSelection:b0 (NSSelection *)i selection s11 li7030 fi-6553 fi-5796 i0 b managedBy:b0 i (NSDataLinkManager *)linkManager i0 b supportingTypes:b0 (NSArray *)i newTypesi0 tab Initializes a newly allocated instance corresponding to a selection in the source document i selectioni0 . i linkManageri0 is the source document's link manager. i newTypesi0 is a set of types that i linkManageri0 's delegate is willing to provide when a destination of the link requests the data described by i selectioni0 . s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (id)b initWithContentsOfFileb0 :(NSString *)i filenamei0 tab Initializes a new instance from i filenamei0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (id)b initWithPasteboard:b0 (NSPasteboard *)i pasteboardi0 tab s11 li7030 fi-6553 fi-5796 tab Initializes a new instance from i pasteboardi0 . pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Exporting a Link fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b saveLinkIn:b0 (NSString *)i directoryNamei0 tab Saves the link in a filename provided by the user; the NSSavePanel'27s initial directory is in i directoryNamei0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b writeToFile:b0 (NSString *)i filenamei0 tab Writes the link into the file i filenamei0 , returning NO if the file can'27t be written. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b writeToPasteboard:b0 (NSPasteboard *)i pasteboard s11 li7030 fi-6553 fi-5796 i0 tab Writes the link onto the pasteboard i pasteboardi0 . pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Information about the Link fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSDataLinkDisposition)b dispositionb0 tab Identifies the link'27s type. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSDataLinkNumber)b linkNumberb0 tab Returns the link'27s number. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSDataLinkManager *)b managerb0 tab Returns the link'27s manager. pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Information about the Link'27s Source fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSDate *)b lastUpdateTimeb0 tab Returns the last time the link was updated. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b openSourceb0 tab Opens the source document of the link and makes the source selection visible. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSString *)b sourceApplicationNameb0 tab Returns the name of the application that owns the source document. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSString *)b sourceFilenameb0 tab Returns the file name of the source document. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSSelection *)b sourceSelectionb0 tab Returns the source selection. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSArray *)b typesb0 tab Returns the types that the source document can provide. pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Information about the Link'27s Destination fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSString *)b destinationApplicationNameb0 tab Returns the name of the application that owns the destination document. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSString *)b destinationFilenameb0 tab Returns the file name of the destination document. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSSelection *)b destinationSelectionb0 tab Returns the destination selection. pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Changing the Link fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b breakb0 tab Breaks the link fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b noteSourceEditedb0 tab Informs a source link that the data referred to by its source selection has changed. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setUpdateMode:b0 (NSDataLinkUpdateMode)i mode s11 li7030 fi-6553 fi-5796 i0 tab Sets the link'27s update mode to i modei0 . s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b updateDestinationb0 tab Updates the data referred to by the link'27s destination selection with the contents referred to by the source selection. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSDataLinkUpdateMode)b updateModeb0 tab Returns the link'27s update mode. fi-6552 fs16 fs28 fi-6552 }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.