Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Undo with table view and array controller (From: Ulrich Hobelmann <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.