I couldn't find any concept better than:  End editing before undoing.

However, I got rid of the code smell of my original solution.  Instead, I 
register the window controller to receive it's document's undo manager's 
NSUndoManagerWillUndoChangeNotification and 
NSUndoManagerWillRedoChangeNotification.  The registered selector ends editing 
as explained in the documentation of -[NSWindow endEditingFor:] ▸ Discussion.

It still seems like Cocoa should be doing this automatically, but it's time to 
move on.

_______________________________________________

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

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

Reply via email to