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: Quincey Morris <email@hidden>
- Date: Sat, 09 May 2015 01:44:20 +0000
On May 8, 2015, at 17:50 , Charles Jenkins <email@hidden> wrote:
>
> I tell the text view its delegate is my Document instance as soon as possible in windowControllerDidLoadNib:
I don’t know the timing offhand, but it’s possible that the text view looks for its undo manager earlier. I’d suggest you hook up its delegate outlet in IB, which means you’ll need to make the window controller its delegate, not the document (unless, that is, you’re using the document subclass as File’s Owner for the document window NIB). The window controller should already have its “document” property set, but you should verify this and if necessary get hold of the document some other way.
The details would be different if you’re using a storyboard, but the window controller is still there to be connected as delegate.
If this continues to be problematic, you might want to examine the source code for TextEdit, which presumably addresses the undo controller issue in much the same way that you want.
_______________________________________________
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