Closed renzos closed 10 years ago
I solved the problem from myself, hope it helps someone:
-(void)documentSyncManager:(TICDSDocumentSyncManager
*)aSyncManager
didMakeChangesToObjectsInBackgroundContextAndSaveWithNotification:(NSNotificatio
n *)aNotification{
[self.masterviewcontroller.arrayController setManagedObjectContext:[[NSApp delegate] managedObjectContext]];
[self.masterviewcontroller.arrayController fetch:nil];
[self.masterviewcontroller.tableView reloadData];
}
so just call setManagedObjectContext before fetch. I didn't understand why I need to set it every time I need to force a fetch.
Hi guys, I'm developing the Mac Client of my iOS app The problem I have is related to the NSTableView refresh. I created an NSArrayController (Entity Mode) to make bindings, it works but when the Mac client receives changes from other clients, I save the managedObjectContext and force a tableView reload with no success. Here the code in the AppDelegate file:
I checked the SQLite file and it gets the updates but the arrayController not. The tableview refreshes on screen but it keeps the old data. If I close the app and start it again the tableview shows the new values. I use a custom table view cell with the NSTextFields binded with the interface builder.