I am working my way through the examples in Hillegass's book 'Cocoa programming for Mac OS-X'. There have been a couple of occasions when a sample application I have been working through starts up and I get a message such as :
2009-03-11 00:39:19.167 CarLot[7517:10b] Cannot create NSData from object <_NSControllerObjectProxy: 0x188bf0> of class _NSControllerObjectProxy
The only way I have found of solving an issue like this is to painstakingly go through all of the bindings and attributes in the interface builder to see where I have missed some configuration - which all takes time!
Is there any more efficient way to determine what the problem is from the error message? Are there any debugging techniques you can use to track down problems like these?
There's a wonderful article on Apple's Dev Site on troubleshooting bindings.
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/Troubleshooting.html
The key take-away? There's a setting called NSBindingDebugLogLevel
that you can use to get debug information.
Two ways to set it:
1 - Permanently in your defaults
defaults write com.yourdomain.yourapplication NSBindingDebugLogLevel 1
2 - Pass it as a parameter when you debug
path/to/your/app -NSBindingDebugLogLevel 1
This Article talks very briefly about this.
Basically, it states that you can look in the Xib files to figure out a bit more quickly what bindings you have set in your app.
Hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With