1

In my project I have two NSOutlineViews set up as below:

enter image description here

The right side is the sub-tree of the selection in the left side and is set up using cocoa bindings using two NSTreeControllers, where the right side is binded to the selection property of the left side. If I add a sub item to the right side as is shown below, the same item in the left side does not become expandable.

I've looked all over for an answer to this, but the only solution I can find so far is to manually call display on the view. Any ideas?

Michael
  • 2,258
  • 1
  • 23
  • 31
  • How are you adding the item to the right-hand side? – Rob Keniger Jul 16 '12 at 11:08
  • Hi rob, it uses the addChild: method of the tree controller that is binded to the right NSOutlineView's tree controller (which in turn is binded to the left NSOutlineView's tree controllers selection). – Michael Jul 16 '12 at 11:24

1 Answers1

0

I have found that calling rearrangeObjects on the tree controller works wonders. Unlike the array controller, which has a checkbox for "Auto Rearrange Content" in the XIB, the tree controller requires you write code for this somewhere.

This:
Correct way to get rearrangeObjects sent to an NSTreeController after changes to nodes in the tree?
is a pertinent discussion about doing so.

Community
  • 1
  • 1
stevesliva
  • 5,351
  • 1
  • 16
  • 39