nsfetchedresultscontrolle

Does it make sense to use a NSFetchedResultsController without an UITableViewController? How are they related?

I mean... could I also just create a plain old UIViewController and then set up a UITableView myself, plus an NSFetchedResultsController? How much do UITableViewController and NSFetchedResultsController interact with eachother? As far as I see it, UITableViewController is NOT by default already adopting the NSFetchedResultsControllerDel...

dynamically change sort descriptor for Fetched results controller

Is there a way to have the sort descriptor(s) be dynamically set for a fetched results controller on iOS? For instance, I need to have the core data results returned to me sorted based on the setting of a segmented control in the navigation title bar. The user can either click the segmented control to sort by Price or Priority. I then...

How to refresh a UITableViewController or NSFetchedResultsController ?

Hi I have a little problem with my UITableViewController or NSFetchedResultsController. I am not sure which is the problem soure but I guess its the UITableViewController. As I said I use a NSFetchedResultsController to fill my data into a UITableViewController. The data is sorted by date and is also displayed in sections by date-year...

EXC_BAD_ACCESS NSArray of ManagedObjects (Core Data)

Something strange is going on with my iphone app. I am using Core Data to store data in a SQLite database. The first time after my app starts up I try to read a table to return all of the rows to fill a UITableView with a list of things for the user to select from. If they chose the top item in the list I get a EXC_BAD_ACCESS exception. ...

NSFetchedResultsController Crashes in 3.0, works fine in 3.1

I have this code, basically copied from Apple's example: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[[[AppDelegate getAppDelegate] myFetchedResultsController] sections] objectAtIndex:section]; return [sectionInfo numberOfObjects]; } O...

NSFetchedResultsController ERROR: The fetched object at index 248 has an out of order section name

trying the solution here: http://stackoverflow.com/questions/1741093?tab=newest#tab-top I'm using a transient property and the category solution and it seems to be working right up until the index char starts to wrap around to the A's again, not sure why it's doing that, just logging what the category/transient getter is returning for u...

NSFetchedResultsController and my TableView structure

I have a tableView controller with two sections. The first section has a couple of input fields and is not really displaying core data. The second section displays items from a database saved with Core Data. I have an NSFetchedResultsController and I serve up data for cellForRowAtIndexPath and didSelectRowAtIndexPath as follows. Fo...

NSFetchedResultsControllerDelegate methods not being called if its predicate use IN ??

Problem: I'm implementing an UITableViewController in conjunction with NSFetchedResultsController. When the UITableViewController is instantiated the NSFetchedResultsController is constructed (substantially in the same way as CoreDataBooks example) with a different predicate, based on selection the user made on the previous controller. ...

NSFetchedResultsController

I have a table view managed by a NSFetchedResultsController. I am using the Apple-provided boilerplate code in my TableViewController. My predicate retrieves objects based on their name. Everything seems to work fine when it comes to adding/deleting objects using the 'edit' button. If I programmatically change an object's name, things al...

NSFetchedResultsController index beyond bounds

I'm using an NSFetchedResultsController to display items in my table view: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections. return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in the section....

Using an NSMutableArray instead of an NSFetchedResultsController

I've recently come to learn that NSFetchedResultsController is an extremely buggy class and its been causing me headaches for a while now with my rather large Core Data app. Would it be appropriate to use an NSMutableArray to feed the table view instead of an NSFetchedResultsController? What I'm talking about is, temporarily creating a ...

Core Data Relationships, NSPredicates and the NSFetchedResultsController

This has been driving me nuts all day. I have a weird bug that I think I have narrowed down to an NSPredicate. I have two entities: List and Person. List has a to-many relationship to Person called persons and Person has a to-many relationship to List called lists. I pass to my a tableview controller a List object. I then want that tab...

Determining which core Data attribute/property change triggered a NSFetchedResultsController update

I have table with a NSFetchedResultsController datasource and delegate. I have another view controller (only for displaying detail) which can be pushed from the table. However, when the vc is pushed, a call to the NSFetchedResultsController "...didChangeObject" method is received for the "update" type. However, the vc being pushed does n...

Using BWOrderedManagedObject with NSFetchedResultsController

I would like to use BWOrderedManagedObject to store an array of ordered objects in Core Data, using NSFetchedResultsController for displaying the data. However, all of BWOrderedManagedObject's methods seem to simply return an array of ordered objects; NSFetchedResultsController requires an NSFetchRequest, and the only way to sort an NSF...

UISearchResultsController crashing on device (index beyond bounds for empty array)

I'm using UISearchResultsController to filter data from a fetchedResultsController. Here is the relevant code: In RootVieweController.h: @interface RootViewController : UITableViewController <NSFetchedResultsControllerDelegate, AdditionViewControllerDelegate, UISearchBarDelegate, UISearchDisplayDelegate> { NSArray *filteredListCo...

'NSFetchedResultsController does not support both change tracking and fetch request's with NSDictionaryResultType'

I have an application that was running just fine under OS3+. But it does not work under OS4. I get the following error message : 'NSFetchedResultsController does not support both change tracking and fetch request's with NSDictionaryResultType' Does it ring a bell to anyone here? (NSFetchedResultsController *)fetchedResultsController {...

Delay UITableView update when NSFetchedResultsController is updated due to NSManagedObjectContext save

I am sorting the UITableView by using a predicate with NSFetchedResultsController. But, when I make a change in a detail view and save it, the object I changed immediately gets placed in its new location in the UITableView. I have up/down buttons similar to the message view in Mail. This behavior disrupts the ordering of items, and I'd ...

UITableView not updating DataSource after change to NSFetchedResultsController

I have an UITableView populated by a NSFetchedResultsController. The initial fetch works fine. I can add, remove, modify, etc with zero problems.. But I want to add user-defined sorting to the table. I am doing this by changing the NSFetchedResultsController to use a different sortDescriptor set, and a different sectionNameKeyPath. Here ...

NSFetchedResultsController returning objects with null indexPaths

Details are in the comments. The following code: // Perform the fetch... NSError *error = nil; if (![[self fetchedResultsController] performFetch:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } // Confirm that objects were fetched by counting them... NSLog(@"Number of Objects = %i", [[fe...

Using an NSFetchedResultsController without a UITableViewController

I'm running into problems trying to use a NSFetchedResultsController without a corresponding UITableViewController. According to Apples documentation: "NSFetchedResultsController is intended to efficiently manage the results returned from a Core Data fetch request to provide data for a UITableView object." So I first researched whethe...