When I select an NSTreeController
in Interface Builder (in Xcode 4.6.3) and look at the attributes inspector, I see two sections named Tree Controller and Object Controller. The Tree Controller part makes some sense, but I'm having trouble finding an explanation of the Object Controller section. The first item is "Mode", with options "Class" and "Entity Name", and I think that you use the latter when using Core Data and the former when not. I'm not using Core Data. So, what's the meaning of the next item, Class Name? It defaults to NSMutableDictionary
, but I thought the standard tree node type was NSTreeNode
. Specifically, if I want my tree node to be an NSTreeNode
whose represented object is an NSMutableDictionary
, how would I fill in the Object Controller section?
Post-answer afterthought: Although I now see that one can use nodes of type NSMutableDictionary
to build the content tree for an outline view, there are advantages to making a subclass of NSTreeNode
. First, NSTreeNode
automatically keeps track of parent links, which can be useful in some cases. Second, I can define my data members as properties, and then access them using dot notation rather than objectForKey:
messages.