objective c - Object handling error in iPhone, select tab in UITabView and crash -


hey everyone, i'm creating tab-view application, , in 1 tab have 7 textfields trying save information "save" button. after making connections between objects in controller.h file , actual text fields, when select tab stuff in it, application crashes , goes springboard. have debug here:

2011-02-23 08:49:02.522 tow boat 911[19138:207] *** terminating app due uncaught exception 'nsunknownkeyexception', reason: '[<uiviewcontroller 0x4e0d1d0> setvalue:forundefinedkey:]: class not key value coding-compliant key colour.' *** call stack @ first throw: (     0   corefoundation                      0x00ec6be9 __exceptionpreprocess + 185     1   libobjc.a.dylib                     0x00cbb5c2 objc_exception_throw + 47     2   corefoundation                      0x00ec6b21 -[nsexception raise] + 17     3   foundation                          0x000286cf _nssetusingkeyvaluesetter + 135     4   foundation                          0x0002863d -[nsobject(nskeyvaluecoding) setvalue:forkey:] + 285     5   uikit                               0x004a78d6 -[uiruntimeoutletconnection connect] + 112     6   corefoundation                      0x00e3d2cf -[nsarray makeobjectsperformselector:] + 239     7   uikit                               0x004a62ed -[uinib instantiatewithowner:options:] + 1041     8   uikit                               0x004a8081 -[nsbundle(uinsbundleadditions) loadnibnamed:owner:options:] + 168     9   uikit                               0x00360a94 -[uiviewcontroller _loadviewfromnibnamed:bundle:] + 70     10  uikit                               0x0035e709 -[uiviewcontroller loadview] + 120     11  uikit                               0x0035e5e3 -[uiviewcontroller view] + 56     12  uikit                               0x00371230 -[uitabbarcontroller transitionfromviewcontroller:toviewcontroller:transition:shouldsetselected:] + 120     13  uikit                               0x0036fd86 -[uitabbarcontroller transitionfromviewcontroller:toviewcontroller:] + 64     14  uikit                               0x00371b7e -[uitabbarcontroller _setselectedviewcontroller:] + 263     15  uikit                               0x003719ed -[uitabbarcontroller _tabbaritemclicked:] + 352     16  uikit                               0x002b0a6e -[uiapplication sendaction:to:from:forevent:] + 119     17  uikit                               0x004ae1f2 -[uitabbar _sendaction:withevent:] + 422     18  uikit                               0x002b0a6e -[uiapplication sendaction:to:from:forevent:] + 119     19  uikit                               0x0033f1b5 -[uicontrol sendaction:to:forevent:] + 67     20  uikit                               0x00341647 -[uicontrol(internal) _sendactionsforevents:withevent:] + 527     21  uikit                               0x0033f16c -[uicontrol sendactionsforcontrolevents:] + 49     22  uikit                               0x002b0a6e -[uiapplication sendaction:to:from:forevent:] + 119     23  uikit                               0x0033f1b5 -[uicontrol sendaction:to:forevent:] + 67     24  uikit                               0x00341647 -[uicontrol(internal) _sendactionsforevents:withevent:] + 527     25  uikit                               0x003401f4 -[uicontrol touchesended:withevent:] + 458     26  uikit                               0x002d50d1 -[uiwindow _sendtouchesforevent:] + 567     27  uikit                               0x002b637a -[uiapplication sendevent:] + 447     28  uikit                               0x002bb732 _uiapplicationhandleevent + 7576     29  graphicsservices                    0x016dda36 purpleeventcallback + 1550     30  corefoundation                      0x00ea8064 __cfrunloop_is_calling_out_to_a_source1_perform_function__ + 52     31  corefoundation                      0x00e086f7 __cfrunloopdosource1 + 215     32  corefoundation                      0x00e05983 __cfrunlooprun + 979     33  corefoundation                      0x00e05240 cfrunlooprunspecific + 208     34  corefoundation                      0x00e05161 cfrunloopruninmode + 97     35  graphicsservices                    0x016dc268 gseventrunmodal + 217     36  graphicsservices                    0x016dc32d gseventrun + 115     37  uikit                               0x002bf42e uiapplicationmain + 1160     38  tow boat 911                        0x00001df8 main + 102     39  tow boat 911                        0x00001d89 start + 53 ) terminate called after throwing instance of 'nsexception' program received signal:  “sigabrt”. 

thanks in advance!

terminating app due uncaught exception 'nsunknownkeyexception', reason: '[ setvalue:forundefinedkey:]: class not key value coding-compliant key colour.

in case check following:

  1. ensure have not misspelled key trying access i.e. colour.

  2. the class attribute trying access i.e. colour should key value compliant. can have attribute declared property in header , synthesize same in implementation file. not change default name getter , setter in property declaration. default method name/signature kvc compliant. apple documentation on kvc covering accessor method code: http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/keyvaluecoding/articles/overview.html

  3. if using core data ensure property being accessed present in corresponding header file , has code in implementation file. can happen have added property later model , have not updated generated header , implementation file.

came across post without answer thought put response may else.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -