FROM : eblugamma
DATE : Thu Apr 10 20:35:21 2008
Hi Chris,
I think I have a solution for you. I've been having the same exact
problem as you, and while looking for the solution, I stumbled upon
your post.
then I stumbled upon the solution. I don't have a clear picture of
whats happening, but your duplicate entry problem centers on the
prepares content option in the tree controller in IB.
turn it off.
thats right, turning off the prepares content option in IB fixes the
duplicate entries problem.
Now for you... that might cause some other problem, but I can assure
you that my model object is very similar to yours and mine works now.
> From: Chris Schmitt
> Subject: NSTreeController Core Data Duplicate Entries Problem
> To: <email_removed>
> Message-ID: <<email_removed>>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> 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
DATE : Thu Apr 10 20:35:21 2008
Hi Chris,
I think I have a solution for you. I've been having the same exact
problem as you, and while looking for the solution, I stumbled upon
your post.
then I stumbled upon the solution. I don't have a clear picture of
whats happening, but your duplicate entry problem centers on the
prepares content option in the tree controller in IB.
turn it off.
thats right, turning off the prepares content option in IB fixes the
duplicate entries problem.
Now for you... that might cause some other problem, but I can assure
you that my model object is very similar to yours and mine works now.
> From: Chris Schmitt
> Subject: NSTreeController Core Data Duplicate Entries Problem
> To: <email_removed>
> Message-ID: <<email_removed>>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> 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
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

