Re: Best Practice for implementing NSUndoManager?
Re: Best Practice for implementing NSUndoManager?
- Subject: Re: Best Practice for implementing NSUndoManager?
- From: Sean Todd <email@hidden>
- Date: Tue, 8 Jun 2004 08:38:26 -0500
Luke,
The link to your sample app didn't work for me so I will just give you
my thoughts on the 2 questions that you posed (in so far as I
understand what you wrote):
1) Should the model or the controller add objects to the undo
manager?
Considering 'reuse' issues, I would say that the model should not have
any knowledge of an undo manager and would opt for the controller.
2) If I am on the right track with question 1, then question 2 is:
How should you propagate the NSUndoManager within the app? At present
I am passing the NSUndoManager to objects during the initialization
of the object, is there an easier or more elegant way to do this?
For this, you could try something like:
[[[NSDocumentController sharedDocumentController] currentDocument]
undoManager];
Sean
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.