Re: bindings and undo
Re: bindings and undo
- Subject: Re: bindings and undo
- From: m <email@hidden>
- Date: Fri, 16 Apr 2004 13:15:53 -0700
On Apr 16, 2004, at 6:18 AM, Mark Onyschuk wrote:
Can't see how there's any sort of problem with bindings and undo. As
per normal, put your undo code into your model and you'll find that
bindings automagically follow the execution of undo/redo as provided
by NSUndoManager.
The controller layer continues to use the same accessors that
pre-binding-layer code would have in past. Specifically, accessor
methods like this:
- (void)setFoo:(id)newFoo
{
if (![foo isEqual:newFoo]) {
[[self undoManagerWithTarget:self] setFoo:foo];
[foo release];
foo = [newFoo copyWithZone:[self zone]];
}
}
...so undos are registered in the same-old-same-old way even though
now they're triggered by bindings.
Ok I see now. Thanks,
_murat
_______________________________________________
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.