I've got an app that worked on Leopard. I ported it to Snow Leopard SDK 10.6, and now it works on Snow Leopard, but it doesn't work correctly on Leopard anymore. I haven't changed anything that ought to affect this.

What doesn't work ?

It's an app with a foreground gui that writes an XML coredata store. A background thread reads the repository and takes action. Both threads have the full core data stack with their own coordinators. As soon as I activate the background thread, the XML store gets set to zero bytes.

The XML store is an atomic store. Everything is loaded at once, and everything is written out for each save. Very NSDocument like. Like TextEdit. Two people open up Text Edit, pointed to the same path mounted over a shared volume. What happens ?

You almost certainly want to use the SQLite store, or have the stacks work with different XML files.

When I encountered the problem I read the doco and I added the NSReadOnlyPersistentStoreOption when calling addPersistentStoreWithType in the background thread, but that hasn't helped. It wasn't necessary before.

NSReadOnlyPersistentStoreOption doesn't have anything to do with multi- threading.

You sure you're not saving a MOC ?

- Ben

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to