On May 8, 2015, at 17:50 , Charles Jenkins <cejw...@gmail.com> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to