0

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.

3
  • 2
    Are you sure you've connected the button to the right controller? Your screenshot shows that it's sending the remove: message to an Array Controller, not a Tree Controller.
    – Alex
    Jun 5, 2009 at 18:30
  • Just connected it to NSTreeController and It won't let me delete. Just Corrected The Links Aswell.
    – Joshua
    Jun 5, 2009 at 18:47
  • 1
    Joshua: Commenting on your own question saying “Any answers please” does exactly nothing to promote answers. Anybody who's reading your question is either going to answer it anyway or not going to answer it anyway. Jun 5, 2009 at 23:37

1 Answer 1

2

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.

9
  • 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
    Jun 6, 2009 at 6:44
  • Have you a solution for my current problem?
    – Joshua
    Jun 6, 2009 at 13:21
  • What exactly do you expect posting multiple comments on my answer to do? Jun 6, 2009 at 16:40
  • Hopefully spark a Response or Answer to my earlier comment.
    – Joshua
    Jun 6, 2009 at 17:39
  • 1
    I suggest putting some breakpoints in your code and stepping through it while trying to add or delete rows.
    – Abizern
    Jun 7, 2009 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.