-2

Ok, so I created a simple drawing app following this tutorial: http://www.raywenderlich.com/18840/how-to-make-a-simple-drawing-app-with-uikit

I got past the part where he adds the RGB sliders and then every time I try opening the settings ViewController, it crashes with this in the output:

* Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key redOutlet.' * First throw call stack: (0x367a72a3 0x32f7e97f 0x367a6f99 0x37e609d1 0x37e5c723 0x3672d61b 0x3703e23d 0x3703dabb 0x36f3601d 0x36ec0465 0x36f4c333 0x36f8dcd1 0x36f8cfc7 0x370af257 0x36f8c0a5 0x36f8c057 0x36f8c035 0x36f8b8eb 0x36f8bde1 0x36eb45f1 0x36ea1801 0x36ea111b 0x324c75a3 0x324c71d3 0x3677c173 0x3677c117 0x3677af99 0x366edebd 0x366edd49 0x324c62eb 0x36ef52f9 0x515f1 0x378aeb20) libc++abi.dylib: terminate called throwing an exception

It worked fine up until I added the RGB sliders. I don't know what it is but I tried commenting out all the code I had added during the RGB slider part and it still crashes. If you would like to view my source code, here your go:

Download my Source Code (287 KB .zip)

I'm kinda desperate to fix this as I would like to finish this app into something more polished and useable. Also, when it crashes, it stops at this line in "main.m":

return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

with "Thread 1: signal SIGBART"

rmaddy
  • 314,917
  • 42
  • 532
  • 579
HSM Interactive
  • 37
  • 3
  • 11
  • Please search on the error you are getting. There are countless existing questions on that error. – rmaddy Jul 15 '13 at 04:35
  • [this class is not key value coding-compliant for the key](https://www.google.co.in/search?output=search&sclient=psy-ab&q=this+class+is+not+key+value+coding-compliant+for+the+key+&oq=this+class+is+not+key+value+coding-compliant+for+the+key+&gs_l=hp.12..0l4.1974.1974.0.4297.1.1.0.0.0.0.252.252.2-1.1.0...0.0.0..1c.2.17.psy-ab.dK4tE_FhEe4&pbx=1&bav=on.2,or.r_cp.r_qf.&bvm=bv.48705608,d.bmk&biw=1011&bih=584&ech=1&psi=S3zjUdXjIoWzrgf1koGoDw.1373862988035.3&emsg=NCSR&noj=1&ei=S3zjUdXjIoWzrgf1koGoDw) – TheTiger Jul 15 '13 at 04:36
  • I did. Nothing seemed to fit my situation. If you know of one, I'll delete this post. – HSM Interactive Jul 15 '13 at 04:37

1 Answers1

1

I got past the part where he adds the RGB sliders and then every time I try opening the settings ViewController

Given the error you're seeing, it sounds like you've got a control (like a slider) connected to an outlet that doesn't exist. When the settings view controller loads its .xib file, the .xib loading machinery is very probably deserializing something in the .xib and trying to connect it to the file's owner using -setValue:forKey: and specifying an outlet that doesn't exist in the view controller, perhaps because you've changed the outlet's name or removed it.

Take a look at your settings view controller's header file. Do you have an outlet named redOutlet? I'm guessing you don't.

Caleb
  • 124,013
  • 19
  • 183
  • 272