Apple introduced streamlined relationships for many relationships in Core Data at Lion. I created an object named TreeNode with a 1: 1-object-to-ratio ratio, a 1: 1-parent relationship, and children of the ordered many-relationship relationship.
Then I have an NSTreeController , and the path for the child keys is TreeNode.children. Launching the application shows only the elements of the first level. Therefore, children do not work. Since children are ordered for many relationships, the corresponding class has NSOrderedSet children. I added a custom method
- (NSArray *) childrenArray { return [children array]; }
in a TreeNode that works. I could not find documentation on this topic. Is this really the way to bind an NSTreeController to an ordered one in many relationships? Thanks in advance.
cocoa core-data cocoa-bindings nstreecontroller
Marius heidenstecker
source share