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 trialMohd Fadzli Mohd Fuzi
1,087 PointsCodes not running according to tutorial
Hi I downloaded the project files but it didn't run according to the tutorial.Did I miss something?
4 Answers
Stone Preston
42,016 Pointswhat happened when you ran it? did you get it an error? what was not correct about it?
Mohd Fadzli Mohd Fuzi
1,087 PointsHi, this is what was returned by XCode:
2014-06-27 10:53:16.079 CrystalBall[33450:60b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<THViewController 0x8e5db90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key predictionLabel.'
*** First throw call stack:
(
0 CoreFoundation 0x017eb1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0156a8e5 objc_exception_throw + 44
2 CoreFoundation 0x0187afe1 -[NSException raise] + 17
3 Foundation 0x0122ad9e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x011971d7 _NSSetUsingKeyValueSetter + 88
5 Foundation 0x01196731 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x011f8b0a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x004e11f4 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x0157c7de -[NSObject performSelector:] + 62
9 CoreFoundation 0x017e676a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x004dfd4d -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x003486f5 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
12 UIKit 0x00348e9d -[UIViewController loadView] + 302
13 UIKit 0x003490d3 -[UIViewController loadViewIfRequired] + 78
14 UIKit 0x003495d9 -[UIViewController view] + 35
15 UIKit 0x00269267 -[UIWindow addRootViewControllerViewIfPossible] + 66
16 UIKit 0x002695ef -[UIWindow _setHidden:forced:] + 312
17 UIKit 0x0026986b -[UIWindow _orderFrontWithoutMakingKey] + 49
18 UIKit 0x002743c8 -[UIWindow makeKeyAndVisible] + 65
19 UIKit 0x00224bc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
20 UIKit 0x00229667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
21 UIKit 0x0023df92 -[UIApplication handleEvent:withNewEvent:] + 3517
22 UIKit 0x0023e555 -[UIApplication sendEvent:] + 85
23 UIKit 0x0022b250 _UIApplicationHandleEvent + 683
24 GraphicsServices 0x037e0f02 _PurpleEventCallback + 776
25 GraphicsServices 0x037e0a0d PurpleEventCallback + 46
26 CoreFoundation 0x01766ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
27 CoreFoundation 0x017669db __CFRunLoopDoSource1 + 523
28 CoreFoundation 0x0179168c __CFRunLoopRun + 2156
29 CoreFoundation 0x017909d3 CFRunLoopRunSpecific + 467
30 CoreFoundation 0x017907eb CFRunLoopRunInMode + 123
31 UIKit 0x00228d9c -[UIApplication _run] + 840
32 UIKit 0x0022af9b UIApplicationMain + 1225
33 CrystalBall 0x0000212d main + 141
34 libdyld.dylib 0x01e32701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Stone Preston
42,016 PointsOk what most likely happened was your renamed an outlet after connecting it. . To fix it just delete the outlet connection and reconnect it:
click on your view controller in storyboard. Then open the connections inspector. Delete anything related to your predictionLabelThen open your header file for that controller and remove the label declaration there. Control click and drag from your label in your storyboard to your header and name the outlet predictionLabel
Mohd Fadzli Mohd Fuzi
1,087 PointsSorry for the late reply. I have done what you told but the problem still occur.I tried to redo the example several times but the problem still occur.
Stone Preston
42,016 Pointsare you sure you did it correctly. open your connections inspector, can you post a screen shot of what you see there