nsfetchedresultscontrolle

Refreshing and Deleting content in background thread error (NSFetchedResultsController)

Hi, I'm using an NSFetchedResultsController to fill content for my UITableViewController. I'm using an NSOperation to gather data from a webService (I'm using a separated ManagedObjectContext as it's another thread) When the data is saved my ViewController (wich is the NSFetchedResultsControllerDelegate) is called and i merge my MOCs u...

How do I change the display order of sections in a UITableview populated from an NSFetchedResultsControler?

Hi There, I was wondering if anyone knew the best solution to defining a custom display order for the sections in a UITableView - I am loading the data using Core Data and an NSFetchedResultsControler, and I am successfully using NSSortDescriptors and also successfully grouping the items returned into sections using sectionNameKeyPath: ...

NSFetchedResultsController and BAD_ACCESS

Hi all, I have a UITableViewController that is fed by a NSFetchedResultsController. Everything worked fine, until I added if (self.fetchedResultsController != nil) { return self.fetchedResultsController; } to the beginning of my -(NSFetchedResultsController *)fetchedResultsController { method. The error I get is: Prog...

NSFetchedResultsController and NSManagedObjectIDResultType crashes

I´m currently working on an ipad app in which I fetch a lot of data with core data. To keep memory profile low I´m setting the requests resultType to NSManagedObjectIDResultType and grabbing objects with the -objectWithID: Method whenever I need real data. Everything works as expected. The problem is when it comes to adding/removing Ob...

NSFetchedResultsController ~ cache causing issues?

Ok here goes my setup: Object Model: * Category object is at the root * Product is linked to a Category (many-to-1) * ShoppingItem is linked to a Product (many-to-1) Application setup: My application has a TabBarController at the root and a tableviewcontroller at the root of each of the tabs. The first tableviewcontroller shows ...

Limit NSFetchedResultsController results, and get more...

HI All, I currently have an NSFetchedResultsController setup to return all rows in a table in my core data database. This then fills up my UITableView. The trouble is this will quickly get out of hand as the rows grow in number. How can I limit the initial query to say 20 results, then add a button somewhere to "Get More" from where we...

How do I reload a NSFetchedResultsController?

I have an app that preloads a months worth of data and it gets released a day at a time. NSDate *now = [NSDate date]; // Create predicate NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(location.name == %@) AND (date < %@)",longLocation,now]; Everything worked great before multi-tasking, but now that it no ...

Core Data: updating a managed object doesn't call the NSFetchedResultsControllerDelegate

I have an issue with my table view not updating when I programmatically change some existing managed object property. I would expect my NSFetchedResultsControllerDelegate to be called in such case, but it isn't. Apple doc says: An instance of NSFetchedResultsController uses methods in this protocol to notify its delegate that the co...

Multiple NsfetchedResultsController on a UItableView

Hi guys! sorry if this is a noob question but i'm having difficulty implementing 2 nsfetchedresultsController in a tableView. i wanted a fetchedresultsController in each section of the table (2 sections), something like this: Wishlist product product2 Bought product3 I know that for this example i wouldn't need 2 nsfetchedResult...

fetchresultscontroller issue or managed object context??

Reference POST: http://stackoverflow.com/questions/3681003/core-data-basic-questions I am able to get the Managed object context from this piece of code. It bring me to another question. I have 2 VIEW CONTROLLERS and 1 NSObject Userlookup (VC) UserlookupSettings(VC) FetchProcessor (NSObject) In sequence, Userlookup vc loads first a...

What's an effective CoreData context/coordinator strategy for this common application pattern?

I have a common application pattern: user enters data in the main view controller, then views it in a table in a modal view controller, where rows can be deleted or modified. I was following the general design strategy from the Stanford iPhone course, but somewhere things went off the rails and all I've been getting is SIGABRT's and exc...

NSFetchedResultsController for same managed object (table)

Hello, I would like to know if I can do this VIEW 1: use NSFetchedResultsController on TABLEA to retrieve the data, display in a table view and take actions to save it NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:referringObject ...

What am I doing wrong with NSManagedObjectContext dependency injection?

I am trying to use NSManagedObjectContext dependency injection as recommended by Marcus Zarra -- I'm creating an M.O.C. in my AppDelegate and passing it as a retained property to each of my view controllers. Generally this seems to work well, but in a modal table view controller that presents data via an NSFetchedResultsController, I on...

Why use NSFetchedResultsController?

Hi All, Core data provides the method "executeFetchRequest" in NSManagedObjectContext class, which we can use to fetch data from tables and use it whatever the way need to. Now there is another way by using NSFetchedResultsController and providing it to UITableView to fetch and data from tables. My questions are now: Which way is fa...

NSFetchedResultsController always returns NSManagedObject objects instead of custom

Hi there, I am using CoreData and have an Entity ContactList defined, which I created using the XCode xcdatamodel tool (or whatever you call that built-in thing:). I also set the Entity's Class name to "ContactList". I then used rentzsch's mogenerator (http://github.com/rentzsch/mogenerator) to generate my custom class files and added t...

sectionNameKeyPath through multiple relationships

Hello all, I am working on an app that uses Core Data and an NSFetchedResultsController. The model setup is like this: /-----------\ /-----------\ /-----------\ |Part | |Kit | |Source | |-----------| |-----------| |-----------| |name | |name | ...

NSFetchedResultscontroller Callbacks not received in NSObject Class

Hi all, I have a class, @interface OnlineDataModel : TTModel < NSFetchedResultsControllerDelegate > { ... Where TTModel is, @interface TTModel : NSObject < TTModel > { ... OnlineDataModel class is Singleton, so its object never expires. I am performing the Fetch operation within this class and setting the delegate of the ...

iOS CoreData: NSFetchedResultsController performances

Hi! In the model, I have two entities: Record and Category. Category is one-to-many with Record through inverse relationship. The persistent store is of SQLITE type and the db is not so small, about 23MB (17k records). I use a list-detail design to show the records table and the detailed record view.The list viewController uses NSFetch...

NSFetchedResultsController

Hi, I am working with a UITableView that gets its data from an NSFetchedResultsController. I would like to add a UISegmentedController to my navigation bar that would toggle the table between displaying all of the records and only the records where starred == YES. I have read some other SO posts indicating that one way to do this is t...

iphone: NSPredicate problem with NSFetchedResultsController

I currently have a 'Topic' entity defined in my system as: @interface Topic : NSManagedObject { } @property (nonatomic, retain) NSString * path; @property (nonatomic, retain) NSString * name; @property (nonatomic, retain) NSNumber * topicID; @property (nonatomic, retain) NSNumber * parent; @end I want to fetch a topic with a specif...