Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacDonaldsd

macrumors 65816
Original poster
Sep 8, 2005
1,005
0
London , UK
Hi,

As as far as I can see you can't save an individual NSManagedObject, you can just tell the NSManagedObjectContext to save all the changes.

Is there anyway round this ?
 
I don't think so. Maybe you could use a different file format that doesn't require rewriting the entire file, like SQLite? Or are you already using that?
 
Im using XML to save the data at the moment.

Basically the problem is, I have some RSS syncing in the application so when any new entries are added I want to save them automatically. But as this happens in the background, the user may be editing a file and I don't want that to save until the user decides they want to.
 
Can't you delay the saving until they've done their editing?

With XML it'll always write everything every time, so you may want to choose a better format.
 
Can't you delay the saving until they've done their editing?

With XML it'll always write everything every time, so you may want to choose a better format.

Yeah I think your right. Just its easier to see how everything is getting saved in XML.

Yeah I suppose that is an option, or do something fiddly with two ManagedObjectContexts and Merge them.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.