Re: Action based undo or snapshot based undo?
Re: Action based undo or snapshot based undo?
- Subject: Re: Action based undo or snapshot based undo?
- From: Greg Titus <email@hidden>
- Date: Thu, 30 Jan 2003 09:29:07 -0800
On Wednesday, January 29, 2003, at 11:58 PM, Alexander Lamb wrote:
with action based undo if it can be rendered as generic as it is in
EOF.
Which means (as Greg also said) to have some kind of elegant way of
notifying of changes in objects so the UI can update accordingly.
NSNotification is the way, however it would be even nicer to have as
in EOF,
the model to which you would simply connect UI elements from IB and
tell
what kind of connexion it is!
Yeah, EOInterface and the concept of associations was really nice for
that.... it wouldn't tend to help you quite as much in productivity
applications as opposed to database applications, though, because
usually your primary interface in the former are views that are custom
to that app. Database apps usually have a much higher proportion of
standard controls.
Now, imagine a user action updates several attributes of the object
model.
You would need to implement in the action method the user calls two
things:
1. Reflect the action in the menu (undo action in your terms)
2. Setup an undo group
Indeed, if one user action updates several attributes (which each
record an
undo action), a simple user undo will not get back far enough, hence
the
undo group. Am I right here?
However, when you think of it, it could maybe even be a standard setup
to
register an undo group at the begining of each event loop. The user
always
want to undo what has been done in the event loop not only part of it!
Exactly. Which is why AppKit already starts an undo group at the
beginning of each event loop, and ends it at the end of each event
loop, so all of this is done for you and you don't have to worry about
it.
Hope this helps,
- Greg
_______________________________________________
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.