Re: Undo with table view and array controller
Re: Undo with table view and array controller
- Subject: Re: Undo with table view and array controller
- From: Jerry Krinock <email@hidden>
- Date: Thu, 21 Dec 2006 20:29:13 -0800
- Thread-topic: Undo with table view and array controller
on 06/12/18 8:55, Ulrich Hobelmann at email@hidden wrote:
> Problem: when the user removes a batch of entries, I do get the removed
> indexes, as well as an array of objects that were removed. I do a
> prepareWithInvocation... on the undomanager, then call
> insertObjects:atIndexes: which has the problem that the array minus the
> removed objects does not have those indexes anymore.
>
> So how is this traditionally done? How do people calculate where
> values should be added, especially in a code-free setting (i.e. when
> bindings and the like are extensively used)?
I don't know, I've done it using code.
> Finally a meta-question: does not undo lead to huge memory leaks?
A meta-answer: I don't know for sure but I'd always assumed that the Undo
Manager retains the objects that are passed with the invocations, and then
releases them when their invocations are removed from the undo and redo
stacks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden