PDA

View Full Version : NSUnknownKeyException error




Blakely028
Jul 5, 2010, 05:08 PM
Hi there,

I made an application that has a slider, textbox and a button and I got a NSUnknownKeyException error. The app loads and then closes almost instantaneously. Here is some of the error:

[Session started at 2010-07-05 23:04:47 +0100.]
2010-07-05 23:04:49.078 Slider[1119:207] Unknown class SliderAppDelegate in Interface Builder file.
2010-07-05 23:04:49.082 Slider[1119:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UICustomObject 0x5c077b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key window.'
*** Call stack at first throw:
(

Any help would be appreciated! :)



robbieduncan
Jul 5, 2010, 05:10 PM
Did you create a class SliderAppDelegate then delete it or something. The error is quite clear: it's trying to create an instance of SliderAppDelegate but the class does not exist.

Blakely028
Jul 5, 2010, 05:23 PM
Did you create a class SliderAppDelegate then delete it or something. The error is quite clear: it's trying to create an instance of SliderAppDelegate but the class does not exist.

Hi, yeah I did delete it. Should I reinstate it?

robbieduncan
Jul 5, 2010, 05:25 PM
Hi, yeah I did delete it. Should I reinstate it?

Depends if you want/need it or not. If not then update the definitions in IB to remove all references to that class (even if you don't have any instances of it make sure the class is not in the Classes tab in the Library.