views:

108

answers:

1

Hello everyone,

I have a Tab-Bar Application for this iPhone application I am making. I make a simple button on the 3rd view (3rd tab), and give it an IBAction to give an alert view. When I press build and go, everything works out fine. I go onto the 3rd tab, and I press my button. It simply crashes... Why is this happening? Everything I put in this 3rd tab crashes. I create a simple view controller, and write the class files to start over, but I keep getting the same errors.. Everything works fine on my first tab, where I originally got the first view controller..

P.S> It also says Incomplete Implementation of Class 'ThirdViewController'. I don't know why its there..

If anyone can help me out here, i would greatly appreciate it.

Kevin

A: 

It's and UIAlertView, right ? This class requires the implementation of the protocol UIAlertViewDelegate and the method alertView:clickedButtonAtIndex: to handle the button click, that's why the compiler tell you that it's incomplete.

Anyway i expirienced some problems on the UIAlertView the first time i used it. My issues was on the otherButtonTitles parameters, the list must be terminated by nil, like this:

[myAlert initWithTitle:@"title" message:@"body " delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:@"ok",@"ignore",@"retry",nil];

Anyway, you can find useful debug about the crash into your console, try to post it here.

Cesar
why doesn't it need it in the firstviewcontroller?
Kevin
I also have the MFMailComposeViewController implemented as well. There are a ton of things I added in this viewcontroller classes.. I don't know why they aren't responding. It just keeps crashing. Everything I put in it crashes..
Kevin
I have 2 buttons actually. I also added a button where it opens a mailcomposer. When I press it, it gives me "EXC_BAD_ACCESS" in the debugger. It also gives me obc_msgSend... Can somebody please help me.. :(
Kevin
I need more information, does it crash after of before entering the the click method ?
Cesar
Before, it doesn't even show the alert, or compose the email. Right when I click it, it just crashes.
Kevin
Ok, check if you have any broken link on the items of your view using Interface Builder. If you delete a linked method from the code you have also to clean by hand the link in IB
Cesar
Yea, I'm pretty sure everything is good to go...
Kevin
I made a copy of it here.. (this is not the full version)... I simply copied the code into a new project, but it still will not work. This time in the new project, the button does not reveal the mail composer.. You can download it here.. http://www.heliotop.org/test.zip
Kevin
downloaded but i think i don't have the right version of the SDK, it crash just after int retVal = UIApplicationMain(argc, argv, nil, nil); in the main...
Cesar
Ok, in the code downloaded there is a broken link into IB about the window in mainWindow.xib (there is also a warning)
Cesar
Oh, I am using XCode 4.0 from the iPhone Developer website.. Can you point out to me where the broken link is??
Kevin
Wow IT WORKS. I found it.. Thanks alot!
Kevin