0

i'm new in iOS developing and the objective c. so i want to start with a simple app. i'm trying to make an app for a play cards game that records the score each round. so it just adds up each team (two teams ) score. in the app interface there will be three buttons and two text fields to add the scores and a text view to see all the scores recorded.

so now i'm on the record method n i get a runtime error after pressing record in the iPhone simulator :

- (IBAction)record:(id)sender {
  //  NSString *slna = lna.text;
   // NSString *slhm = lhm.text;
    int x, y, resultx, resulty;
x  = [lna.text integerValue];
y  = [lhm.text integerValue];
resultx = 0;
resulty = 0;
resultx= resultx+x;
resulty= resulty+y;
alnashrah.text = [NSString stringWithFormat:@"%d      %d", resultx,resulty];    

the error message i get : " Thread 1 : breakpoint 2.1 "

Muhsag
  • 155
  • 3
  • 11

1 Answers1

3

IF that is all the information the console is telling us, this is not an error message, it means you added a breakpoint. Beside your code, you will see a gutter line, if you press it you can add breakpoints which are these blue arrow things. Here is an image:

Breakpoint

So to unselect the breakpoint, just click it or right click it and press delete.

Also to disable breakpoints: command+Y or press the breakpoints select button at the top near the stop button and the scheme bar and the build status bar

MCKapur
  • 9,127
  • 9
  • 58
  • 101
  • okay id did that but now i get this one : Thread 1:EXC_BREACKPOINT(code=EXC_I386_BPT, subcode=0*0) – Muhsag May 13 '12 at 06:26
  • for this code : @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } – Muhsag May 13 '12 at 06:28
  • Whats are u getting in console – MCKapur May 13 '12 at 07:32
  • 2012-05-13 01:39:34.412 sakkah[64201:f803] *** NSInvocation: warning: object 0x3514 of class 'ViewController' does not implement methodSignatureForSelector: -- trouble ahead 2012-05-13 01:39:34.415 sakkah[64201:f803] *** NSInvocation: warning: object 0x3514 of class 'ViewController' does not implement doesNotRecognizeSelector: -- abort (lldb) – Muhsag May 13 '12 at 08:39
  • ahh ok there is a problem in your code, inside ViewController Can you show all ur code in ViewController There is a problem with a method: methodSignatureForSelector – MCKapur May 13 '12 at 08:44
  • also, if that still does not work, go to edit scheme, then select the run bar, then change LLDB to GDB – MCKapur May 13 '12 at 08:45
  • alright i got every thing working perfectly Except for the erase button,, which is basically an undo button. – Muhsag May 14 '12 at 01:43
  • I am so angry about how my app crashes because I accidentally clicked somewhere I wasn't supposed to. I hate xCode as an IDE. I love Apple and iOS, but stupid shit like this can get so frustrating. Thanks for the answer though, I'll never make this mistake again – OneChillDude Oct 07 '13 at 05:06
  • @bwheeler96 Haha, Xcode is a great IDE, the best one you will find. – MCKapur Oct 07 '13 at 12:20
  • hahaha ya I think I'm just bitter about the small things like this. I'm starting to like it more and more, but at times it definitely feels unstable – OneChillDude Oct 07 '13 at 16:24