• 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
NSTreeController Core Data Duplicate Entries Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTreeController Core Data Duplicate Entries Problem


  • Subject: NSTreeController Core Data Duplicate Entries Problem
  • From: Chris Schmitt <email@hidden>
  • Date: Mon, 14 Jan 2008 12:16:36 -0500

I have a simple core data application set up with 1 entity for tracking folders. This entity has a circular reference to itself to mark the Children and Parent objects. I then added an NSTreeController to a simple form and hooked it up to an NSOutlineView. After hooking up the bindings and a add and delete button I can add records to the tree controller and the display works fine.

My problem is, when I reopen the application the data was not being loaded into the NSTreeControl, so checked the prepares content button and my data showed up. Now when I add a new child entity to one of my existing entities I get a duplicate parent created.

Example:
Folder 1
  Child 1
Folder 2

When I add a Child 1 to Folder 1 I get the following:

Folder 1
  Child 1
Folder 2
  Child 1
Folder 3

The child record is being created, but a new parent record (Folder 3) is also being created. The add button is hooked up to the addChild: method on the NSTreeController.

How do I stop this duplicate entry problem?

Thanks in advance.
Chris Schmitt _______________________________________________


Cocoa-dev mailing list (email@hidden)

Please 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: Finder/iTunes Sidebar View ?
  • Next by Date: CATransition and animationDidStop:finished: delegate method.
  • Previous by thread: Re: Finder/iTunes Sidebar View ?
  • Next by thread: CATransition and animationDidStop:finished: delegate method.
  • Index(es):
    • Date
    • Thread