Jump to content

Xcode Calculator App Error: throw exception SIGART in appdelegate...HELP

Oh the majority of the code I have would be...

In the viewcontroller.h

- (IBAction)button8:(id)sender;

In the viewcontroller.m

- (IBAction)button8:(I'd)sender {

_display.text = _display.text [NSString stringWithFormat@"8"];

}

Error in the app delegate throw exceptions SIGART thing...

Link to post
Share on other sites

I had a lot written for this, then because of VBulitenBulishit I lost it all so I quickly typed some stuff figuring I'd explain later...

Anyways, thanks here is the output stating the error:

2013-04-18 18:35:43.545 Calculator[344:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key zero.'

*** First throw call stack:

(0x1c92012 0x10cfe7e 0x1d1afb1 0xb7be41 0xafd5f8 0xafd0e7 0xb27b58 0x231019 0x10e3663 0x1c8d45a 0x22fb1c 0xf47e7 0xf4dc8 0xf4ff8 0xf5232 0x443d5 0x4476f 0x44905 0x4d917 0x1196c 0x1294b 0x23cb5 0x24beb 0x16698 0x1beddf9 0x1bedad0 0x1c07bf5 0x1c07962 0x1c38bb6 0x1c37f44 0x1c37e1b 0x1217a 0x13ffc 0x25bd 0x24e5)

libc++abi.dylib: terminate called throwing an exception

I believe that the problem is in the _display.text = [NSString stringWithFormat@"numberhere"]; code...

I realize that the code should be written as _display.text = _display.text [NSString stringWithFormat@"numberhere"]; to add whatever I type to the current display, but there clearly is something wrong with the code...

Link to post
Share on other sites

If I make one button able to access and change the text of a UILabel outlet via( _display.text = [NSString stringWithFormat:@"%@stringhere", _display.text]; then it works, but as soon as I add two buttons that do that, it crashes and throws an exception.

I am still a beginner but I want to figure out why this is doing what it does.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×