Is there a way to link a controller (e.g., the NSArrayController) to my NSDocument's NSUndoManager without having to add a bunch of code to my NSDocument subclass?

For example, in Hillegass's book, the first example of RaiseMan (Chap 8) has a nice clean design that lets the NSArrayController manage all interactions between the table view and the NSArray model.

But when adding the undo/redo capability (Chap 9) you have to add a lot of code to MyDocument to intercept and register with the NSUndoManager all insertion/deletion and edits to the model. This seems inelegant.

It would be nice to register MyDocument's NSUndoManager with the NSArrayController so that the NSArrayController can handle all the undo and redos.

Is it possible to do this?

Thanks,

Todd



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to