Re: Help with Undo and MVC
Re: Help with Undo and MVC
- Subject: Re: Help with Undo and MVC
- From: Drew McCormack <email@hidden>
- Date: Mon, 3 Nov 2003 08:52:24 +0100
On Nov 3, 2003, at 8:31 AM, Stephen Magyari wrote:
I've exhausted every brain cell I have left (both of 'em) trying to get
Undo/Redo support to work in my Obj-C Doc-based Cocoa app, and I'm
stuck.
I've searched the archives, read this article
(www.ex-cinder.com/downloads/undo-article.rtf), read through the docs,
and
perused the included Example code (Sketch, TextEdit, and SimpleComboBox
primarily) and after several attempts & variations, I have myself
thoroughly
confused -- it has to be something so obvious that I'm clearly missing
it....
Following the info from the archives & the article, I have the
Undo/Redo
support at the model level, while my document is acting as the
controller.
As such, I have a model "Book" (NSObject subclass) with (for example):
- (void)setBookTitle:(NSString *)title;
{
[[undoManager prepareWithInvocationTarget:self]
Wouldn't you need to do this?
[[[doc undoManager] prepareWithInvocationTarget:self]];
Drew
_______________________________________________
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.