Using XCode 4.2 with ARC.
I'm trying to write a custom view for a hierachy of stuff. I'm using NSTreeController.
I also have a standard outline view. My nodes have a property 'name' which is an NSAttributedString.
In my standard outline view using bindings, I have bound the column to the tree controller's "arrangedObjects.name" IB Complains that this is an attributed string, not a string but nevertheless it works, displays properly, and can be edited (for font and color, for example).
On the other hand, in my custom view if I try to bind arrangedObjects.name to anything, it is an error -- "[<_NSControllerTreeProxy 0x1003389c0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key name."
This is, of course, in agreement with the documentation, but not in agreement with what NSOutlineView does!
I can probably do what I want with arrangedObjects.childNodes and recursion and other code, but
- How does OutlineView do it? and,
- Why does IB give me a red warning for an attributed string going to an outline view column?