@@ -99,45 +99,6 @@ extern NSString* const SSYUndoManagerDocumentWillSaveNotification ;
99
99
NSManagedObjectContext * m_managedObjectContext ;
100
100
}
101
101
102
- /* !
103
- @brief Gets a newSSYDooDooUndoManager instance and assigns it
104
- to a given document and its managed object context.
105
-
106
- @details The document is required for three reasons:
107
- * The returned SSYDooDooUndoManager instance is set as its undo manager.
108
- * The returned SSYDooDooUndoManager instance is set as its
109
- managed object context's undo manager.
110
- * The returned SSYDooDooUndoManager begins observing it for
111
- SSYUndoManagerDocumentWillSaveNotification.
112
- * A weak reference to the document's undo manager is kept
113
- in order to -processPendingChanges before ending an undo group.
114
-
115
- Although the document could possibly be obtained by iterating
116
- through the shared NSDocumentController's documents, that will fail
117
- if you invoke this method during document initialization, before it
118
- has been added to NSDocumentController, which you usually do.
119
-
120
- Note that NSDocument creates an NSUndoManager and assigns it during
121
- its initialization. Thus, the document you pass will probably already
122
- have an undo manager. That's OK, though. We just set our own
123
- instead, and the original NSUndoManager instance is discarded.
124
-
125
- We access the managed object context of the given document by
126
- sending -managedObjectContext to it. If the document has never
127
- has never before had its managed object context accessed in this
128
- way, this will cause one to be created. Thus, if your document
129
- did not have a managed object context prior to being passed to
130
- this method, it will have one after this method executes.
131
- It needs one sooner or later anyhow.
132
-
133
- @param document The document to be associated with the new
134
- SSYDooDooUndoManager instance.
135
- @result The new SSYDooDooUndoManager instance. Typically, you
136
- don't need this. You can always get it later by sending -undoManager
137
- to your document.
138
- */
139
- + (SSYDooDooUndoManager*)makeUndoManagerForDocument : (NSDocument *)document ;
140
-
141
102
/* !
142
103
@brief Begins an undo grouping which is highly resistant to
143
104
being screwed up by Core Data and closes itself automatically.
@@ -189,18 +150,6 @@ extern NSString* const SSYUndoManagerDocumentWillSaveNotification ;
189
150
*/
190
151
- (void )endUndoGrouping ;
191
152
192
- /* !
193
- @brief Performs operations necessary to make the receiver act as the undo
194
- manager for a given document
195
- @details You typically send this after initializing the receiver, if the
196
- receiver is to be the undo manager for a document. This method does not
197
- associate a document's managed object context, if any. For Core Data documents,
198
- you must also -coupleToManagedObjectContext:.
199
- */
200
- - (void )coupleToDocument : (NSDocument *)document ;
201
-
202
- - (void )coupleToManagedObjectContext : (NSManagedObjectContext *)managedObjectContext ;
203
-
204
153
@end
205
154
206
155
0 commit comments