First of all, I'd like to say that I am a total newbie to iPhone development, and that there is probably an obvious thing i'm missing.
I have a view based application. I went into "MainWindow.xib", and changed the "Nib Name" to "MainMenu", the name of my app's menu's xib. I have a button in there, connected to an action (showWordChooser), and whenever the button is pressed the app crashes.
Debugger contents:
2011-01-07 15:56:01.987 NCEAVerbs[20479:207] -[NCEAVerbsViewController showWordChooser]: unrecognized selector sent to instance 0x4b251c0
2011-01-07 15:56:01.990 NCEAVerbs[20479:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NCEAVerbsViewController showWordChooser]: unrecognized selector sent to instance 0x4b251c0'
*** Call stack at first throw:
(
0 CoreFoundation 0x00da7be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00efc5c2 objc_exception_throw + 47
2 CoreFoundation 0x00da96fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00d19366 ___forwarding___ + 966
4 CoreFoundation 0x00d18f22 _CF_forwarding_prep_0 + 50
5 UIKit 0x00012a6e -[UIApplication sendAction:to:from:forEvent:] + 119
6 UIKit 0x000a11b5 -[UIControl sendAction:to:forEvent:] + 67
7 UIKit 0x000a3647 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
8 UIKit 0x000a21f4 -[UIControl touchesEnded:withEvent:] + 458
9 UIKit 0x000370d1 -[UIWindow _sendTouchesForEvent:] + 567
10 UIKit 0x0001837a -[UIApplication sendEvent:] + 447
11 UIKit 0x0001d732 _UIApplicationHandleEvent + 7576
12 GraphicsServices 0x0101ca36 PurpleEventCallback + 1550
13 CoreFoundation 0x00d89064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
14 CoreFoundation 0x00ce96f7 __CFRunLoopDoSource1 + 215
15 CoreFoundation 0x00ce6983 __CFRunLoopRun + 979
16 CoreFoundation 0x00ce6240 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x00ce6161 CFRunLoopRunInMode + 97
18 GraphicsServices 0x0101b268 GSEventRunModal + 217
19 GraphicsServices 0x0101b32d GSEventRun + 115
20 UIKit 0x0002142e UIApplicationMain + 1160
21 NCEAVerbs 0x00001b64 main + 102
22 NCEAVerbs 0x00001af5 start + 53
)
terminate called after throwing an instance of 'NSException'
sharedlibrary apply-load-rules all
if i do a bt:
(gdb) bt
#0 0x90a16176 in __kill ()
#1 0x90a16168 in kill$UNIX2003 ()
#2 0x90aa889d in raise ()
#3 0x90abe9bc in abort ()
#4 0x99a16fba in __gnu_cxx::__verbose_terminate_handler ()
#5 0x00efc4e7 in _objc_terminate ()
#6 0x99a1515a in __cxxabiv1::__terminate ()
#7 0x99a1519a in std::terminate ()
#8 0x99a15298 in __cxa_throw ()
#9 0x00efc635 in objc_exception_throw ()
#10 0x00da96fb in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
#11 0x00d19366 in ___forwarding___ ()
#12 0x00d18f22 in __forwarding_prep_0___ ()
#13 0x00012a6e in -[UIApplication sendAction:to:from:forEvent:] ()
#14 0x000a11b5 in -[UIControl sendAction:to:forEvent:] ()
#15 0x000a3647 in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
#16 0x000a21f4 in -[UIControl touchesEnded:withEvent:] ()
#17 0x000370d1 in -[UIWindow _sendTouchesForEvent:] ()
#18 0x0001837a in -[UIApplication sendEvent:] ()
#19 0x0001d732 in _UIApplicationHandleEvent ()
#20 0x0101ca36 in PurpleEventCallback ()
#21 0x00d89064 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#22 0x00ce96f7 in __CFRunLoopDoSource1 ()
#23 0x00ce6983 in __CFRunLoopRun ()
#24 0x00ce6240 in CFRunLoopRunSpecific ()
#25 0x00ce6161 in CFRunLoopRunInMode ()
#26 0x0101b268 in GSEventRunModal ()
#27 0x0101b32d in GSEventRun ()
#28 0x0002142e in UIApplicationMain ()
#29 0x00001b64 in main (argc=1, argv=0xbffff08c) at /Developer/Projects/NCEAVerbs/NCEAVerbs-main.m:13
(gdb)
I really have no idea what's going on, please help :)
-[NCEAVerbsViewController showWordChooser]: unrecognized selector sent to instance 0x4b251c0
You are apparently trying to call the showWordChooser
somewhere, which does not exist in the location you are calling.
The error means you haven't defined the method. Check for misspelled method names, or have you placed the function in the wrong file?
User contributions licensed under CC BY-SA 3.0