Hi Chris,

On 5/12/08, Chris Idou <[EMAIL PROTECTED]> wrote:

I've got a main thread that handles a gui, and a worker thread with its own persistentStoreCoordinator and managedObjectContext. The gui notifies the worker thread of a change, passing it an objectID, and the worker thread gets the object, and other objects it is connected to, and calls [managedObjectContext refreshObject: on them.

But they don't seem to get an updated object. I'm using the XML store. The store is saved, I've checked that the new values are in the XML. But refresh doesn't seem to update anything. Is there any trick to it?

Yes, I believe there are some tricks and also possibly some cases where it just won't update anything. Ben Trumbull was kind enough to contribute to a similar question I posted back in October. Here is the thread: http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg19221.html

In particular see his comment about the issue with small staleness intervals. At the time, I thought that had solved my problem but I've since discovered other scenarios where refreshObject doesn't update anything. Its possibly more likely to occur after optimistic locking errors (which, so far, I am unable to avoid). But I haven't yet demonstrated that with any degree of scientific method. I'm going to put it under the microscope again over the Christmas holidays. Feel free to stay in touch about it.

Best regards and best of luck,

Steve


_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to