Skip navigation.
 
mlRe: Action based undo or snapshot based undo?
FROM : Greg Titus
DATE : Thu Jan 30 18:29:07 2003

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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlAction based undo or snapshot based undo? Alexander Lamb Jan 29, 08:32
mlRe: Action based undo or snapshot based undo? Greg Titus Jan 29, 18:37
mlRe: Action based undo or snapshot based undo? Jim Correia Jan 29, 20:07
mlRe: Action based undo or snapshot based undo? Greg Titus Jan 29, 21:03
mlRe: Action based undo or snapshot based undo? Bill Cheeseman Jan 29, 21:19
mlRe: Action based undo or snapshot based undo? Brock Brandenberg Jan 29, 21:23
mlRe: Action based undo or snapshot based undo? Eric Wang Jan 30, 02:10
mlRe: Action based undo or snapshot based undo? Bill Cheeseman Jan 30, 02:17
mlRe: Action based undo or snapshot based undo? Greg Titus Jan 30, 03:56
mlRe: Action based undo or snapshot based undo? Brock Brandenberg Jan 30, 06:11
mlRe: Action based undo or snapshot based undo? Alexander Lamb Jan 30, 08:58
mlRe: Action based undo or snapshot based undo? Izidor Jerebic Jan 30, 13:54
mlRe: Action based undo or snapshot based undo? Izidor Jerebic Jan 30, 14:20
mlRe: Action based undo or snapshot based undo? Bill Cheeseman Jan 30, 16:13
mlRe: Action based undo or snapshot based undo? Greg Titus Jan 30, 18:29
mlRe: Action based undo or snapshot based undo? Brock Brandenberg Jan 30, 23:12
mlRe: Action based undo or snapshot based undo? Summary! Alexander Lamb Feb 6, 12:10
mlRe: Action based undo or snapshot based undo? Summary! Bill Cheeseman Feb 6, 13:08
mlRe: Action based undo or snapshot based undo? Summary! Greg Titus Feb 6, 17:56
mlRe: Action based undo or snapshot based undo? Summary! Alexander Lamb Feb 7, 14:22
mlRe: Action based undo or snapshot based undo? Summary! Marco Scheurer Feb 7, 16:07