I'm trying to use a browser view with bindings to represent some data and I'm getting an error message:
2008-11-11 17:22:28.636 BrowserViewTest[18269:813] Cocoa Bindings: Error accessing value
for key path arrangedObjects.projects of object <NSTreeController: 0x1321e0>[object class: BillingCode]
(from bound object <NSBrowser: 0x126930> with object ID 0 in Nib named MainMenu.nib):
[<_NSControllerTreeProxy 0x128630> valueForUndefinedKey:]: this class is not key
value coding-compliant for the key displayString.
2008-11-11 17:22:28.638 BrowserViewTest[18269:813] Brow view cont awakeFromNib
2008-11-11 17:22:28.639 BrowserViewTest[18269:813] project count: 0
As shown by the NSLog output, this happens even before awakeFromNib
is called in my app controller, and even though I know that BillingCode is KVC compliant for displayString.
It seems to be related to the value set for "Class" under my Tree Controller->Attributes->Object Controller, as if I change the name of that Class the name in the error message changes with it. The weird thing is as far as I know there shouldn't be any objects in the content array at that point, as I don't add them till awakeFromNib
gets called.