tags:

views:

75

answers:

1

I am building a small application with the following structure:

AppDelegate: Loads the menu Controller

MenuController: Controls 4 menu items that are created in the xib file A xib file with the following structure - view - Image View (Background) - Second View (MiddleView) - Navigation Bar - segmentedControl

TrackController: Is getting load by the MenuController

I load the page with the following code:

 TracksController *currentView = [[TracksController alloc] initWithNibName:@"TracksController" bundle:nil];

 [MiddleView addSubview:currentView.view];

 [currentView release];

The errormessage what I got is: 2009-11-17 11:25:17.336 Par23[1883:20b] * -[NSCFType playNow:]: unrecognized selector sent to instance 0x48361e0 2009-11-17 11:25:17.337 Par23[1883:20b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFType playNow:]: unrecognized selector sent to instance 0x48361e0'

playNow is a IBAction in TracksController.

I think my problem is my logica. And that the view within the view isn't the way how you should work. This because it isn't a problem within the button IBAction.

I hope I explained it enough

+1  A: 

The first thing I would check is that you haven't made the case mistake you made in your post. playNow: is not equal to PlayNow:.

Second thing I would check is does the TracksController or the button which connects to playNow: have multiple connections attached. You check this in IB, using the connections panel.

If those don't help, does TracksController trigger playNow programmatically at all?

Maybe, since you've stacked up views, a method selector is getting passed to the wrong viewcontroller?

Kenny Winker
In my question is mistype. it is playNow and that is correct.It also doensn't have multiple connections.I think the mainproblem is that I use a segmentedcontrol to do the same things a tabbarcontrol does. The reason that I choose for this, is that I need the space. So probably this gives weird things
Marko