Re: Where and how do I know a save completed successfully?
Re: Where and how do I know a save completed successfully?
- Subject: Re: Where and how do I know a save completed successfully?
- From: Charles Jenkins <email@hidden>
- Date: Fri, 08 May 2015 20:50:44 -0400
On May 8, 2015 at 1:09:01 PM, Quincey Morris (email@hidden) wrote:
In this case, the text view should probably use the document undo manager, though you may have to do extra work to coordinate its use with your document’s needs. To configure it, you should tell the text view what its undo manager is, via its ‘undoManagerForTextView:’ delegate method.
My NSTextViewDelegate section begins like this:
extension Document : NSTextViewDelegate { /// Plug document undo manager into the text v
func undoManagerForTextView( view:NSTextView )
-> NSUndoManager?
{
var um = self.undoManager
describeUndoManager( um, source:"NSTextViewDelegate.undoManagerForTextView:" )
return self.undoManager
}
I think the delegate is good, because its other methods get called. But this one doesn’t. I tell the text view its delegate is my Document instance as soon as possible in windowControllerDidLoadNib: — right after I test and find that my Document’s undoManager is NOT nil. So the situation remains that the Document has an undoManager, but the text view’s undoManager variable remains nil throughout execution. Is there still a step I’m missing?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden