Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialbecky hayes
2,226 PointsTrying to connect 'show another fun fact button' and print 'You pressed me' but i keep getting errors
I'm a beginner and keep getting the following error 'class AppDelegate: UIResponder, UIApplicationDelegate { error message Thread1: signal SIGBABRT
I've searched in the community and there seem to be similar threads but none of the answers are helping me out. Does anyone know how to resolve this issue? As i'm a beginner i would appreciate it if you could walk me through step by step!
3 Answers
becky hayes
2,226 Pointsp.s. this is the error message in the compiler...
2016-02-13 23:18:58.292 Fun Facts [2837:482657] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Foto_Ruta_s_Photography_Tips.ViewController 0x7fa0e3c304c0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key showFunFact.' *** First throw call stack: (
Walter Somerville
20,698 PointsIt sounds like you may have either not created the showFunFact function, or have a typo on the function declaration.
If you can post your code I'd be happy to take a look for you!
By the way, you can put 3 back ticks (underneath esc key) around code, with the name of the language on the first line, to put it in a syntax highlighted code block so its easier to read.
class forumResponse {
func post() {
print("Hope that helps!")
}
}
stevenblasi
16,101 PointsSOLUTION: if you delete the code for the @IBAction and not the button itself, your button will still have the "Sent Events" that Pasan Premaratne deletes in the video when redoing the button attachment to the code. MAKE SURE the connections are removed from the first connection. Step-by-step solution: 1) right click on the button in Main.Storyboard 2)delete all existing "Events" (and/or accidental outlets) 3)create a brand new connection from Main.Storyboard Button to ViewController.swift code