Re: Saving undo actions with document
Re: Saving undo actions with document
- Subject: Re: Saving undo actions with document
- From: "John C. Randolph" <email@hidden>
- Date: Wed, 5 Sep 2001 00:17:03 -0700
On Tuesday, September 4, 2001, at 11:40 PM, Youngjin Kim wrote:
Hi,
NSUndoManager has made undo-redoing very simple. and I enjoy it very
much. What I'd need to do additionally is to save document as well as
it's undo actions so that user can retrieve document back to original
states even though it's saved and reopened.
I have a naive idea that it might be possible to save NSUndoManager
object's contents itself instead tracing document's changes separately
with NSUndoManager. but NSUndoManager doesn't seem to allow access to
contents of its instance. Would this be possible? how if so?
Have you tried just serializing the NSUndoManager with
-encodeWithCoder:? I haven't tried it, but it seems to me that an undo
managers should be archivable just like any other Appkit object.
-jcr
"These kids today don't know the simple joy of saving four bytes of
page-0 memory on a 6502" - unknown