views:

403

answers:

1

Hello, I'm not matching any key to value in my code, my code is only about implementing protocol in interface implementation.but when i try to execute, i'm not getting any error, but its crashing due to this exception:

***Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MyClass 0X3d1d2b0>setvalue:forundefinedKey:]:this class is not key value coding-compilant for the key window'.
A: 

The error can be caused by other thing that explicit coding.

For example, when you use bindings, a mis-coded class can generate this kind of exception:

  • you have a class that has an int property named Foo.
  • you bind the Foo property in Interface Builder.
  • the runtime expects that you provide accessors to the property. If any is missing, then this exception is thrown.

The exception says that the window key is not found. Do have any bindings or implicit connections to your classe ?

You can also use these instructions for troubleshooting your issue:

defaults write com.yourdomain.yourapplication NSBindingDebugLogLevel 1
Laurent Etiemble
Hey thanks a lots :)its working
suse