0

I have touched on this question in others before but after writing an answer to a previous question there got me wondering why this isn't possible - or am I missing the fact that it might be?

Given that Interface Builder is very good at graphically linking various methods and delegates and data sources, is it possible that there's no straightforward graphical means to populate an OutlineView using two entities made in a Core Data model that have a parent child relationship set up so that (I believe) there is enough information to define what parent nodes the child nodes would be listed under in the outlineview?

It confuses me as I see this as a very logical way of storing two distinct sources of information and later displaying their relationship. At the moment I am trying to work without using NSTreeController, using my own datasource, and edging into territory far beyond my current ability.

biscuitstack
  • 11,591
  • 1
  • 26
  • 41

2 Answers2

2

The NSTreeController is the supposed to be the controller for outlines but it's always had problems (granted I haven't used it recently.) People have often had to roll their own.

You need a tree controller or the equivalent because the outline view display isolated objects but instead indexpaths through an object graph. The outline doesn't really understand a parent->child relationships just an indexpath relation of say 1.1 or 1.2.

If you can't get NSTreeController to work like you need, take a look at the class and write your own. For an outline you really do need something that provides an indexpath that the outline view understands.

TechZen
  • 64,370
  • 15
  • 118
  • 145
  • Thanks for your comment TechZen. I should have explained a little bit better that I am using my own class (when I said I was using my own datasource other than NSTreeController). Originally, I thought NSTreeController might have been able to implement the void I described above. I'm creating a class that combines two entities into an outlineview based on their parent relationship in core data. I'm just surprised that there was no in-built class in interfacebuilder to do this as it seems like such a common situation to find yourself in. I'm struggling with my attempt - but getting there slowly – biscuitstack Mar 03 '11 at 21:26
  • Let me look at your previous question. I don't think I really understand what you are trying to do. – TechZen Mar 04 '11 at 00:08
  • The past question isn't as relevant as I had thought. I basically wanted to see if there was some built-in controller to combine two entities into an `nsoutlineview` based on the child parent relationship of the entities. I believe the silence suggests that there isn't. – biscuitstack Mar 11 '11 at 16:52
0

I believe the silence to this question and the lack of results on google suggest this is not a built-in aspect of xcode. I hope it will be in future as all the information needed is in the child-parent relationship of the entities.

Until then I'm making my own class to do so.

biscuitstack
  • 11,591
  • 1
  • 26
  • 41