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

  • SEARCH
  • Home
  • 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 8073375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:19:28+00:00 2026-06-05T14:19:28+00:00

I have a strange issue with an NSFetchedResultsController that can only handle performFetch when

  • 0

I have a strange issue with an NSFetchedResultsController that can only handle performFetch when all the entity.numbers are the same number (this NSFetchedResultsController sorts the entities using number. This is kind of like a playlist that uses an indexNumber attribute to keep the playlist order.

- (IBAction)addSetPressed {
    int theNumber = [self.nameTextField.text intValue];
    WSet *set = [WSet wSetWithNumber:theNumber inManagedObjectContext:self.workout.managedObjectContext];
    [self.workout addExercisesObject:set];
}

self.nameTextField is in my UITableView‘s Header. I’ll put a number there, like 1 for example, and then I press a UIButton that calls addSetPressed. This code is meant to add an entity to my model and the NSFetchedResultsController detects the change in the model and updates my UITableView.

Here’s the issue:
When I enter 1 (or any number) in self.nameTextField, I can press the UIButton as many times as I want to and the code works great. But when I change the number in self.nameTextField I get an error:

[__NSCFNumber localizedCaseInsensitiveCompare:]: unrecognized selector sent to instance 0xb665b80
CoreData: error: Serious application error.  Exception was caught during Core Data change processing.  This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification.

I have spent the last 12 hours messing around with my code and researching the issue, but I can’t figure it out.

It will be great if you a and tip for me, or can point me towards some literature that can help.

  • 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-05T14:19:29+00:00Added an answer on June 5, 2026 at 2:19 pm

    Fixed!

    Here’s the problem. When I setup my sortDescriptor, I need to select the appropriate selector to compare the type of attribute I’m sorting by.

    This is correct since number is handled as an NSNumber

    request.sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"number" ascending:YES selector:@selector(compare:)]];
    

    I had the selector for NSString before.

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

Sidebar

Related Questions

Strange issue. I have SQL Server running on an EC2 box that I can
I have this strange issue where anytime I open a XAML file that contains
I have a very strange issue, that I'm hoping someone here can help me
I have a strange issue that has arisen recently: Whenever I enter text, even
I have a strange issue with jQuery's hover, addClass $(document).ready(function(){ $('#selectable li').hover( function(){ $(this).addClass('selecting',
I am facing a very strange issue. I have a SharePoint webpart that displays
Have following strange issue, have 7 lines (same classes) but after 2 lines it's
I have a strange issue with my code I can't seem to figure out.
I have a strange issue from a client in that our code, which they
I have this strange issue with some third party DLL's. The third party provider

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.