Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving undo actions with document



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.

Yes I have, John. but I doesn't seem to conform NSCoding protocol.

[NSArchiver archiveRootObject:myundos toFile:@"myundos.dat"];
-[NSUndoManager encodeWithCoder:]: selector not recognized.

Maybe I was too excited about undo manager? <grin>
Tyvm,

Youngjin


References: 
 >Re: Saving undo actions with document (From: "John C. Randolph" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.