Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Can anyone tell me if the NSUndoManager is only used with EOF or can I use it in my own application (not using EOF) ?


PS: some important docs I want to bring to light in case you Don't use undo/redo much...


EOEditingContext's undo support is arbitrarily deep; you can undo an object repeatedly until you restore it to the state it was in when it was first created or fetched into its editing context. Even after saving, you can undo a change. To support this feature, the NSUndoManager can keep a lot of data in memory.


If the typical usage patterns for your application generate a lot of change processing, you might want to limit the undo feature to keep its memory usage in check. For example, you could clear an undo manager whenever its editing context saves. To do so, simply send the undo manager a removeAllActions message (or a removeAllActionsWithTarget message with the editing context as the argument). If your application doesn't need undo at all, you can avoid any undo overhead by setting the editing context's undo manager to null with setUndoManager.

More Info

If you are using Undo/Redo, it is important to read the Memory Management section.