On 03/04/2009, at 3:15 PM, Huibert Aalbers wrote:

Wow,

That certainly qualified as a simple solution :-) However, it didn't work. Maybe that is because my application is not document-based.

Any additional suggestions?


Hrrm, well, you didn't actually mention that rather important fact...

Still, never mind, the solution is much the same. If your app isn't document based, it sounds like perhaps there's a disconnect between your undo manager and your window. To ensure this doesn't happen, make sure you return your undo manager using the window delegate's method:

-windowWillReturnUndoManager:

So for example if the window delegate is the main controller that manages the data model and the undo manager, it should just return the undo manager using this method. Then the automatic management of the window 'dirty' flag should work automatically as for doc-based apps.

--Graham


_______________________________________________

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