views:

147

answers:

1

When I select a row in my outline view (connected to a NSTreeController) and click the remove button it doesn't delete the row that I have selected but actually deletes the row at the bottom of the table. For some more information here is my Connections for the Button:

http://snapplr.com/t1hm

and the Entity model:

http://snapplr.com/k6n3

If you need more info feel free to comment.

+2  A: 

First, echoing Alex's comment, correct both bindings to be bound to the tree controller instead of the array controller.

Second, make sure you bind the outline view's “Selection Index Paths” binding to the tree controller's selectionIndexPaths property, so that the tree controller knows what's selected.

Peter Hosey
Thanks, I have corrected both bindings and have bidden the outline view's “Selection Index Paths” binding to the tree controller's selectionIndexPaths property but now it will not let me add any rows to the outline view. Here is a picture of the Outline View Binding.
Joshua
http://snapplr.com/s75z
Joshua
Have you a solution for my current problem?
Joshua
Please Some Help?
Joshua
What exactly do you expect posting multiple comments on my answer to do?
Peter Hosey
Hopefully spark a Response or Answer to my earlier comment.
Joshua
Do you know why it will not longer let me add or delete any rows?
Joshua
“Hopefully spark a Response or Answer to my earlier comment.” Posting *one* comment might do that, but multiple comments does not. “Do you know why it will not longer let me add or delete any rows?” No.
Peter Hosey
I suggest putting some breakpoints in your code and stepping through it while trying to add or delete rows.
Abizern
Abizern: What do you mean breakpoints?
Joshua
Joshua, since you're unaware of what a breakpoint is; here's a link to Xcode's debugging guide which explains what they are and how to use them, as well as other ways to find out why your program isn't working as you expect. http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeDebugging/000-Introduction/Introduction.html
Abizern
Ah, I understand how to use breakpoints now, but where should I put them because I don't know what is going wrong. I know it only happens when I add the selectionIndexPaths binding, but there is no error in the de-bugger or anything. So i can't seem to find out whats is going wrong.
Joshua