This is NSDataLinkManager.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 NSDataLinkManager 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 fi0 NSObject (NSObject) fs20 fs28 s8 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSDataLinkManager.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 NSDataLinkManager object (also known as a i data link manageri0 or simply i link manageri0 ) manages data linked from and into a document through NSDataLink objects. NSDataLink objects (or i data linksi0 ) provide a link between a selection in a source document and a dependent, dynamically updated selection in a destination document. When a user does a Paste and Link command in the destination document, the link manager creates the link in response to a b addLink:at:b0 message. When this link is added to the destination document, it makes a connection with the source document'27s link manager, which creates a source link in the source application. fs16 fs28 If an application supports data linking, a link manager should be instantiated for every document the application creates. A link manager must be assigned a delegate that assists it in keeping the document up to date; this delegate must implement some or all of the methods listed in the 'aaMethods Implemented by the Delegate'ba section of this class specification. In addition, the delegate must keep the link manager informed of the state of the document, sending it messages whenever the document is edited, saved, or otherwise altered. fs16 fs28 Only applications that support continuously updating links need to be aware of when source links are created; these applications can have the delegate of the destination document'27s link manager return YES in response to a b dataLinkManagerTracksLinksIndividually:b0 message, and then respond to b dataLinkManager:startTrackingLink:b0 messages to receive notifications that source links are created. fs16 fs28 For more information about NSDataLink objects, see the NSDataLink class description. See the NSSelection class description for more information on NSSelection objects. fs16 fs28 pard s19 li100 fi0 ri1007 ql f0 b fs24 fs28 Initializing and Freeing a Link Manager fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (id)b initWithDelegate:b0 (id)i anObjecti0 tab Initializes and returns a newly allocated instance, designating i anObjecti0 as the delegate. fi-6552 fs16 fs28 fi-6552 {f3 -} (id)b initWithDelegate:b0 (id)i anObjecti0 tab Initializes and returns a newly allocated instance s11 li7030 fi-6553 fi-5796 b fromFile:b0 (NSString *)i pathi0 tab tab designating i anObjecti0 as the delegate. The document's file is specified by the full path i path. pard s19 li100 fi0 ri1007 ql f0 b i0 fs48 fs28 Adding and Removing Links fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b addLink:b0 (NSDataLink *)i linki0 tab Adds the link i linki0 to the document, indicating that the data s11 li7030 fi-6553 fi-5796 b at:b0 (NSSelection *)i selectioni0 tab tab in the document described by i selectioni0 is dependent upon the link. tab s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b addLinkAsMarker:b0 (NSDataLink *)i linki0 tab Incorporates i linki0 into the document as a marker in the s11 li7030 fi-6553 fi-5796 b at:b0 (NSSelection *)i selectiontab tab i0 location of the destination document described by i selectioni0 . s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (NSDataLink *)b addLinkPreviouslyAt:b0 (NSSelection *)i oldSelection s11 li7030 fi-6553 fi-5796 i0 b fromPasteboard:b0 (NSPasteboard *)i pasteboardi0 tab Creates and adds a new destination link corresponding totab b at:b0 (NSSelection *)i selectioni0 tab tab the same source data as the link described by the destination selection i oldSelectioni0 with the new link's destination selection provided ini selection;i0 the document's links must have been written to the pasteboard i pasteboard. s9 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (void)b breakAllLinksb0 tab Breaks all the destination links in the document. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b writeLinksToPasteboard:b0 (NSPasteboard *)i pasteboardi0 tab s11 li7030 fi-6553 fi-5796 tab Writes all the link manager'27s links to i pasteboardi0 . pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Informing the Link Manager of Document Status fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b noteDocumentClosedb0 tab Informs link manager that document has been closed. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b noteDocumentEditedb0 tab Informs link manager that document has been edited. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b noteDocumentRevertedb0 tab Informs link manager that changes have been reverted. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b noteDocumentSavedb0 tab Informs link manager that document has been saved. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b noteDocumentSavedAs:b0 (NSString *)i pathi0 tab Informs link manager that document has been saved in the file specified by the full pathname i pathi0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b noteDocumentSavedTo:b0 (NSString *)i pathi0 tab Informs link manager that document has been saved in the file specified by the full pathname i pathi0 . pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Getting and Setting Information about the Link Manager fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (id)b delegateb0 tab Returns the data link manager'27s delegate. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b delegateVerifiesLinksb0 tab Returns YES if delegate is asked to verify updates. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSString *)b filenameb0 tab Returns the filename for the link manager'27s document. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b interactsWithUserb0 tab Tells whether the link manager displays panels if link errors occur. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b isEditedb0 tab Returns YES if the document was edited since the last save. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setDelegateVerifiesLinks:b0 (BOOL)i flagi0 tab Sets whether the delegate is asked to verify updates. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setInteractsWithUser:b0 (BOOL)i flagi0 tab Sets whether the link manager displays panels if link errors occur. pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Getting and Setting Information about the Manager'27s Links fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b areLinkOutlinesVisibleb0 tab Returns YES if outlines are visible. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSEnumerator *)b destinationLinkEnumeratorb0 tab Returns an enumerator of the destination'27s source links. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSDataLink *)b destinationLinkWithSelection:b0 (NSSelection *)i destSel s11 li7030 fi-6553 fi-5796 i0 tab Returns the destination link for the selection i destSeli0 . s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setLinkOutlinesVisible:b0 (BOOL)i flagi0 tab Sets whether outlines are visible. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSEnumerator *)b sourceLinkEnumeratorb0 tab Returns an enumerator of the receiver'27s source links. pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Methods Implemented by the Delegate fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b copyToPasteboard:b0 (NSPasteboard *)i pasteboardi0 s11 li7030 fi-6553 fi-5796 b at:b0 (NSSelection *)i selectioni0 tab Implemented by the link manager'27s delegate to supply the b cheapCopyAllowed:b0 (BOOL)i flagi0 tab tab source data described by i selectioni0 on the pasteboard i pasteboardi0 . If i flagi0 is YES, the system guarantees that no events will be processed by the application before the delegate is requested to provide the specified data; in this case, the application doesn'27t necessarily have to write any data representations to the pasteboard. This method should return YES upon success, or NO if the selection can'27t be resolved. s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b dataLinkManager:b0 (NSDataLinkManager *)i senderi0 s11 li7030 fi-6553 fi-5796 b didBreakLink:b0 (NSDataLink *)i linki0 tab Informs the delegate that the destination link i linki0 was broken and thus data based on the link's destination selection will no longer be updated. s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b dataLinkManager:b0 (NSDataLinkManager *)i senderi0 s11 li7030 fi-6553 fi-5796 b isUpdateNeededForLink:b0 (NSDataLink *)i linki0 tab Returns YES if the source data identified by i linki0 's source selection has been modified since the link's last update time. s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b dataLinkManager:b0 (NSDataLinkManager *)i senderi0 s11 li7030 fi-6553 fi-5796 b startTrackingLink:b0 (NSDataLink *)i linki0 tab Informs the delegate that a destination document has established a data link i linki0 to the link manager's document and is tracking it. s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b dataLinkManager:b0 (NSDataLinkManager *)i senderi0 s11 li7030 fi-6553 fi-5796 b stopTrackingLink:b0 (NSDataLink *)i linki0 tab Informs the delegate that a destination is no longer tracking the source link i linki0 . s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b dataLinkManagerCloseDocument:b0 (NSDataLinkManager *)i sender s11 li7030 fi-6553 fi-5796 i0 tab Closes documents opened without the user interface. s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b dataLinkManagerDidEditLinks:b0 (NSDataLinkManager *)i sender s11 li7030 fi-6553 fi-5796 i0 tab Informs the delegate that link data has been modified; the delegate should use this notification to mark the document as edited. s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b dataLinkManagerRedrawLinkOutlines:b0 (NSDataLinkManager *)i sender s11 li7030 fi-6553 fi-5796 i0 tab Directs the delegate to redraw objects with link outlines. s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b dataLinkManagerTracksLinksIndividually:b0 (NSDataLinkManager *)i sender s11 li7030 fi-6553 fi-5796 i0 tab Returns whether the receiver is willing to track links individually. s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b importFile:b0 (NSString *)i filenamei0 tab Imports the filei filenamei0 at the destination described by s11 li7030 fi-6553 fi-5796 b at:b0 (NSSelection *)i selectioni0 tab i tab selectioni0 . Returns YES upon success, or NO if the selection can'27t be resolved. s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b pasteFromPasteboard:b0 (NSPasteboard *)i pasteboardi0 s11 li7030 fi-6553 fi-5796 b at:b0 (NSSelection *)i selectiontab i0 Pastes the updated data that has been made available on i pasteboardi0 . The destination for the data is described by i selectioni0 , which was supplied to the link manager as an argument to the b addLink:at:b0 method. Returns YES upon success, or NO if the selection can'27t be resolved. s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b showSelection:b0 (NSSelection *)i selectioni0 tab Shows the source data for the specified selection i selectioni0 . Returns YES upon success, or NO if the selection can'27t be resolved. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSWindow *)b windowForSelection:b0 (NSSelection *)i selection s11 li7030 fi-6553 fi-5796 i0 tab Returns the NSWindow object for the given i selectioni0 , or b nilb0 if the selection can'27t be resolved. s9 li7029 fi-5794 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.