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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:15:40+00:00 2026-05-13T07:15:40+00:00

I must have misunderstood something. I simply want to use performSelector: to call one

  • 0

I must have misunderstood something. I simply want to use performSelector: to call one of my own methods. Here I have the method declaration in the @interface:

-(void)forceReload;

FYI, all of this code is defined on only one type. And here is the method implementation and the calling method:

-(void)forceReload {
    // code here...
}

-(void)entryActivityEditViewControllerDidFinish {

    // etc...

    DebugLog(@"self=%@", self);
    DebugLog(@"responds to selector=%@", [self respondsToSelector:@selector(forceReload:)] ? @"true" : @"false");
    [self forceReload]; // Works fine
    [self performSelector:@selector(forceReload:)]; // unrecognized selector
}

What confounds me is that I can send the message directly to the object but it fails when used with performSelector:. Should success with the former imply success with the latter?

And to round it out, here’s some debug spew showing that my target object (self) is the very type I think it is and that I’m sending to the appropriate object. I also included a call to respondsToSelector: and found that my object does not respond to forceReload: which confounds me yet more. Why would this be?

0x1006030/-[EntryActivityTableViewController entryActivityEditViewControllerDidFinish] (EntryActivityTableViewController.m:236): self=<EntryActivityTableViewController: 0x1259160>
0x1006030/-[EntryActivityTableViewController entryActivityEditViewControllerDidFinish] (EntryActivityTableViewController.m:237): responds to selector=false
2009-12-20 10:22:44.999 Workouts[407:207] *** -[EntryActivityTableViewController forceReload:]: unrecognized selector sent to instance 0x1259160
2009-12-20 10:22:45.017 Workouts[407:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[EntryActivityTableViewController forceReload:]: unrecognized selector sent to instance 0x1259160'

Please tell me where my understanding is wrong. 🙂

  • 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-13T07:15:40+00:00Added an answer on May 13, 2026 at 7:15 am

    Your method takes no arguments, but your @selector() call requests a selector that takes one argument. What you want is this:

    [self performSelector:@selector(forceReload)]; // unrecognized selector
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I must have missed something here. I am trying to create a table but
You must have noticed one link in yahoo.com, msn.com or other popular websites named
I must have overlooked something completely obvious?? but my button displays its image and
I must have done something wrong. I have a C# project in Visual Studio
I'm still learning C and I must have misunderstood pointers at some point. I
I must have done something very stupid which has caused the following situation. Basically
I must have a mental block, but I simply can't find the reverse of
I must have missed something regarding generics in Java, but why does this not
I must have missed something in my LINQ training. In Linq to SQL using
I must have uninstalled something recently because the Data Connections no longer work. When

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.