I get the following error message when compiling:
2011-11-27 14:59:32.049 Storyboard[12104:f803] -[TargetViewController setPeople:]:unrecognized selector sent to instance 0x6d50310
2011-11-27 14:59:32.051 Storyboard[12104:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TargetViewController setPeople:]: unrecognized selector sent to instance 0x6d50310'
*** First throw call stack:
(0x13c5052 0x1556d0a 0x13c6ced 0x132bf00 0x132bce2 0x2877 0x1a9d6 0x1b8a6 0x2a743 0x2b1f8 0x1eaa9 0x12affa9 0x13991c5 0x12fe022 0x12fc90a 0x12fbdb4 0x12fbccb 0x1b2a7 0x1ca9b 0x2508 0x2465)
terminate called throwing an exception
Funnily enough, my TargetViewController doesn’t even have a “people” property (NSMutableArray).
The structure of my app is that i have a tabbarcontroller with a tableView which got a detailView, and in the second tab a normal View (targetVieController) with a popover.
(As you might see I set up the whole thing with a storyboard, thats also the name of my app.
Fast help is appreciated!
EDIT
Maybe I should add that the compiler throws the error as soon as the app starts to load…
Following Michaels and MrMusic’s suggestions, I searched my Call stack for people and got this:
_cmd = SEL 0x6eae setPeople: (I reckon this is just a notice that there is the breakpoint)
And, surprisingly, i have an array that contains to “humans”, but they are not displayed in my tableview in the other tab.
Backtrace:
#0 -[TargetViewController setPeople:] (self=0x6891f90, _cmd=0x6e8e, b=0x689a8d0) at /Developer/Projects/Storyboard/Storyboard/TargetViewController.m:73
#1 0x000027c7 in -[CoverdaleAppDelegate application:didFinishLaunchingWithOptions:] (self=0x6a7a650, _cmd=0x4c796a, application=0xad74840, launchOptions=0x0) at /Developer/Projects/Storyboard/Storyboard/CoverdaleAppDelegate.m:44
#2 0x0001a9d6 in -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] ()
#3 0x0001b8a6 in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] ()
#4 0x0002a743 in -[UIApplication handleEvent:withNewEvent:] ()
#5 0x0002b1f8 in -[UIApplication sendEvent:] ()
#6 0x0001eaa9 in _UIApplicationHandleEvent ()
#7 0x012affa9 in PurpleEventCallback ()
#8 0x013991c5 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#9 0x012fe022 in __CFRunLoopDoSource1 ()
#10 0x012fc90a in __CFRunLoopRun ()
#11 0x012fbdb4 in CFRunLoopRunSpecific ()
#12 0x012fbccb in CFRunLoopRunInMode ()
#13 0x0001b2a7 in -[UIApplication _run] ()
#14 0x0001ca9b in UIApplicationMain ()
#15 0x00002458 in main (argc=1, argv=0xbffff644) at /Developer/Projects/Storyboard/Storyboard/main.m:16
Search your project for “.people” and “setPeople” to see where that
NSMutableArraycollection is being set. Verify that you’re always settingpeopleon the appropriate object (object that has the people property or a subclass of the object with the people property).Edit: something somewhere is trying to set the people collection. If searching for “.people” and “setPeople” literally returns nothing then perhaps something in IB or the StoryBoard is trying to set people. My original thought was some view controller incorrectly has type TargetViewController and is trying to set people (perhaps you’re saying
myViewController.people = ...where myViewController is the wrong type.