Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6973541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:07:17+00:00 2026-05-27T17:07:17+00:00

my app cant seem to find the selector (submitScore:) but i have already declared

  • 0

my app cant seem to find the selector (submitScore:) but i have already declared it

here :

 @interface Highscores (Private)
    - (void)loadCurrentPlayer;
    - (void)loadHighscores;
    - (void)updateHighscores;
    - (void)saveCurrentPlayer;
    - (void)saveHighscores;
    - (void)button1Callback:(id)sender;
    - (void)button2Callback:(id)sender;
    -(void)button3Callback:(id)sender;
    -(void)submitScore:(id)sender;
    -(void)viewBoard:(id)sender
@end

then it is called in here:

    UIButton *mybutton1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    mybutton1.frame=CGRectMake(80, 50, 150, 40);
    [mybutton1 setTitle:@"Submit Score" forState:UIControlStateNormal];
    [mybutton1 addTarget:self action:@selector(submitScore:) forControlEvents:UIControlEventTouchUpInside];
    UIButton *mybutton2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    mybutton2.frame=CGRectMake(80,100,150,40);
    [mybutton2 setTitle:@"View Leaderboard" forState:UIControlStateNormal];
    [mybutton2 addTarget:self action:@selector(viewBoard:) forControlEvents:UIControlEventTouchUpInside];

    [myView addSubview:mybutton1];
    [myView addSubview:mybutton2];
    [myView release];

}

-(void)submitScore
{
    NSString *request_url = [NSString stringWithFormat: @"http://192.168.18.8/lboard/addrank.php?did=%@&sre=%@&nme=%@&fmt=jsn",
                             currentScore, currentPlayer];
    NSURL *url = [NSURL URLWithString:request_url]; 
    ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
    request.delegate=self;
    [request setDidFinishSelector:@selector(requestFinished:)];
    [request setDidFailSelector:@selector(requestFailed:)]; 
    [request startAsynchronous];

whenever i press one of those 2 buttons i get this error:

2011-12-22 14:27:32.462 tweejump[5381:707] -[Highscores submitScore:]: unrecognized selector sent to instance 0x267970
2011-12-22 14:27:32.469 tweejump[5381:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Highscores submitScore:]: unrecognized selector sent to instance 0x267970'

terminate called throwing an exceptionProgram received signal:  “SIGABRT”.

i tried the solutions on other topics like weak linking the lib but i still get that error.

what else should i do? how can i remove the SIGABRT?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:07:17+00:00Added an answer on May 27, 2026 at 5:07 pm

    You’ve specified myButton1‘s selector to be for a method with the signature of - (void)submitScore:(id)sender when in actuality your method signature is - (void)submitScore.

    Set the selector to myButton1 to @selector(submitScore).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Maybe the solution is obvious, but I cant seem to find a good one.
May be a easily solvable problem but I cant seem to find a solution.
I see they support in-app purchases, but I can't seem to find a definitive
Bit of a basic question but I cant seem to find a straight answer
I got an app with UITableView. Every cell has accessory. But i cant set
I am trying to make an android app and I can't seem to find
I cant seem to find the answer to this, mainly because I don't know
I know this must be an age-old, tired question, but I cant seem to
I need help on my code igniter app..i can't seem to find out what's
I can't seem to find an answer out there for this. Here's the scenario:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.