• 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
Removing an object from an ArrayController...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Removing an object from an ArrayController...


  • Subject: Removing an object from an ArrayController...
  • From: Colin Doncaster <email@hidden>
  • Date: Wed, 17 Jan 2007 09:32:26 -0500

In a follow up to my previous question -

I've read the note on the removeObject: method for NSArrayController when dealing with Core Data. I have my array controller set to
"Delete Object on Remove"
so when remove: is called it deletes the object.


If this is set, and I call removeObjectAtArrangedObjectIndex: ( which breaks the relationship and then marks the object for delete ) but create a new relationship straight away - will the object still be deleted or will creating the new relationship remove the delete request?

With that said, is there a way to temporarily change this behaviour on an NSArrayController, so I can turn it off, remove the object without deleting it, then turn it back on? I can't seem to work out how to adjust the contentSet parameters.

As a side note, if the remove actually just breaks the relationship does that mean there's a chance a lot of unassociated objects can live within the graph with no way ( unless I write a method for inspecting the graph for them ) to clean them up? This seems like it could be a bit of a gotcha for newbie core data users and a cause for unwanted memory leaks ( or at least hogging ).

thanks.
_______________________________________________

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


  • Follow-Ups:
    • Re: Removing an object from an ArrayController...
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: Re: core data, selected items and undo
  • Next by Date: Re: cloning an NSTableView
  • Previous by thread: Re: NSTableView vertical focus change...
  • Next by thread: Re: Removing an object from an ArrayController...
  • Index(es):
    • Date
    • Thread