On 25/03/2012, at 5:34 AM, Doug Clinton wrote:

> I don't know if this was the issue that Steven was asking about, but I've 
> been wondering if there is a recommended way to persist the undo stack so 
> that it's still available if you restart the app, or close and re-open the 
> document. It's always bothered me that there is this great mechanism for 
> handling undo, but that all the history is thrown away when you close the app.


No easy way I know of. The undo architecture relies on a huge amount of state 
within the app external to the undo stack itself. You'd have to save all of 
that state somehow.

In fact, most apps throw away the undo history on a document save (you arrange 
this), as a way to recover the memory used by undo, since the whole state is 
being saved in the file anyway. Versions are the supported mechanism for 
persistent document undo.

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

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

Reply via email to