I have a simple Core Data model with just one entity which has two relationships, parent and children, with them pointing at each other and parent being to many children. They also have three attributes, index, an Int 64, name, a string, and type, an Int 16.

This model is bound to an Array Controller, a Tree Controller, and a custom class that serves as an NSOutlineViewDataSource.

My issue is this: I can't rearrange items within a given tier. I can move them into and out of each other, but I can't simply have 3 items all on the same level and move the bottom one to be at the top, for example. If I try, what happens is I get a log message that properly reports where I moved the item to and from, but it doesn't actually move the item until I quit the app and relaunch it. Moving items into and out of eachother is instantly reflected. Any idea what I'm doing wrong?

I followed the tutorial I found here to get most of the way to where I am:

This works most of the time, except it seems that if the move object originally wasn't a child of anything, I'll end up with two copies of the object: one where it should be, and a second at the bottom of the list of children for the parent. If I add in a check to see if the object was a child of anything and do nothing if it wasn't, it'll be added without a duplicate, but only the child in the wrong spot will be there.