1

I have the following setup:

UITableViewController that uses self.fetchedResultsController to fetch entities sorted by a number attribute, which starts at 1 & so on.

A UIButton is used to create a new entity. New entities are inserted at the beginning of the list, and the existed entities are shifted down.

the UITableViewController handles adding one entity just fine. But after I add another, I get the following error:

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

My code for adding the entities is fine, I can see it work ok. The fetchedResultsController delegate methods are in my superclass and work fine in other subclasses.

I'm going crazy, can anyone guess whats going on?

The only thing I can think of is that it is trying to sort the entities using an integer. Can that be it?

4

0 回答 0