• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Undo with Table View and array controller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Undo with Table View and array controller


  • Subject: RE: Undo with Table View and array controller
  • From: Matt <email@hidden>
  • Date: Fri, 22 Dec 2006 16:37:40 -0500

If you are going to try and insert objects at specific indexes back into an array that has changed since then, you are going to have do something special to get it all working correctly.

Ar you using the array controller itself to insertObjects: atArrangedObjectsIndexes:? I haven't messed with undo on multiple objects in a table view, but I would think that using the contoller to insert objects wouldn't be a problem.


On Dec 22, 2006, at 6:27 AM, 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


  • Prev by Date: Re: NSCreateMapTable - capacity argument clarification?
  • Next by Date: Re: LineForm's Filters Table
  • Previous by thread: Re: Undo with table view and array controller
  • Next by thread: Re: Using bindings to make an NSPopupButton to assign an array filter predicate
  • Index(es):
    • Date
    • Thread