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 7948927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:51:36+00:00 2026-06-04T01:51:36+00:00

I had this method that I was calling and everything was fine: DataHandler: .h:

  • 0

I had this method that I was calling and everything was fine:

DataHandler:

.h:    
-(void)saveNumberOfTries:(NSString*)numberOfTries toWord:(NSString *)indexOfWord;
.m:
-(void)saveNumberOfTries:(NSString*)numberOfTries toWord:(NSString *)indexOfWord {...}

ViewController.m

DataHandler *dataHandler = [[DataHandler alloc] init];
[dataHandler performSelector:@selector(saveNumberOfTries:toWord:) withObject:numberOfTries withObject:wordId];

..I then updated it to take one more argument:

DataHandler:

.h:    
-(void)saveNumberOfTries:(NSString*)numberOfTries toWord:(NSString *)indexOfWord currentLevel:(NSString*)userSelectedLevel;

.m:
-(void)saveNumberOfTries:(NSString*)numberOfTries toWord:(NSString *)indexOfWord currentLevel:(NSString*)userSelectedLevel {...}

ViewController.m:

DataHandler *dataHandler = [[DataHandler alloc] init];

[dataHandler performSelector:@selector(saveNumberOfTries:toWord:currentLevel:) withObject:numberOfTries withObject:wordId withObject:selectedLevel];

But the compiler is now giving me “Receiver type ‘DataHandler’ for instance message does not declare a method with selector ‘performSelector:withObject:withObject:withObject:'”.

If I put in the original method call (without changing anything in the DataHandler) it doesn’t give me any warnings although the method no longer exists. It seems Xcode isn’t keeping up with my changes. Any ideas or suggestions?

  • 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-06-04T01:51:38+00:00Added an answer on June 4, 2026 at 1:51 am

    Because there is no method like performSelector:withObject:withObject:withObject:

    You can compress into NSArray or NSDictionary and then use performSelector:withObject:withObject:

    Like in your case-

    -(void)saveNumberOfTries:(NSString*)numberOfTries toWordWithCurrentLevel:(NSDictionary *)wordAndLevel;
    

    Other way if you don’t want to change definition of method, you can try like below then it will work fine –

    [dataHandler saveNumberOfTries:numberOfTries toWord:wordId currentLevel:selectedLevel];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had this nasty bug that disappeared in the past but now after quite
I had this doubt for sometime now, some people say that there's no such
I had this error when I browse new web site that site sub from
I had this working in an old code that I didn’t end up using...
Using Java, I have a method which I'm calling with method.invoke that returns a
If I'm calling a method that uses a out or ref parameter why do
Had this working; at one stage. The problem is the following text is now
I had this question earlier and it was concluded it was a bug in
I had this answer on another post I asked: I believe the VS designer
I had this problem before and can't for life of me remember how to

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.