I’m trying to bind an NSTreeController’s “arrangedObjects” to a custom view’s “managedContent” (so that it can show a custom outline, for instance). In the setter…
- (void)setManagedContent:(NSArray *)newManagedContentArray {
//code goes here
}
nothing ends up working since newManagedContentArray (“arrangedObjects”) apparently isn’t an NSArray (and therefore I can’t addObject: etc. etc.) Instead it’s showing up as an NSControllerTreeProxy. My question is, what exactly is “arrangedObjects” supposed to be? Am I supposed to bind to it? If so, how?
arrangedObjectsisn’t supposed to be an array forNSTreeController. It states this quite clearly in the documentation. What you do get is the proxy object you are seeing, which you can use thechildNodesanddescendantNodeAtIndexPath:method on to get your tree structure.