Re: Handling Undo/Redo in KVC To-Many Accessors
Re: Handling Undo/Redo in KVC To-Many Accessors
- Subject: Re: Handling Undo/Redo in KVC To-Many Accessors
- From: Sean Todd <email@hidden>
- Date: Tue, 11 May 2004 09:31:57 -0500
On May 10, 2004, at 4:43 PM, Chris Giordano wrote:
You could try using the array controller's
insertObject:atArrangedObjectIndex: and
removeObjectAtArrangedObjectIndex: methods rather than the model's
insertObject:inToDosAtIndex: and removeObjectAtIndex: for the undo
actions. This should still trigger the model changes, but should also
cause to happen all the other magic that makes array controllers so
convenient. I don't think I tried that when I was trying to replicate
your problem in my code since it really wouldn't fit with my code, but
it might work, would involve changing only two lines (other than the
one addition), and it's possible you wouldn't have to lose the
selection.
I **DID** use the array controller's methods for the undo actions.
That's why I believe that this behavior reflects a bug in the
framework. Yes, I could understand why it would behave that way if I
had use the NSArray methods but I didn't.
Thanks again,
Sean
_______________________________________________
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.