Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making changes in a Background thread with Core Data



Hello,
My App uses a background thread that makes some changes to objects properties (using a different context than the main thread). It makes the changes, saves the context (everything is flushed to the SQL store) and notifies the main thread through a NSMachPort that changes were made.
When the main thread receives the notification it calls refreshObject:mergeChanges: to update to the new values that are in the persistent store.


The problem is that I have a TableView displaying some of the objects that are being changed, using Cocoa Bindings. Because the tableview retains those objects, they are not turned into a fault and consequently the UI doesn't reflect the changes made in the background thread.

I have tried passing YES an NO as the second argument to refreshObject:mergeChanges: but to the same result.

How can I force those objects to refresh their properties from the persistent store?

Thank you for your time! Any hints would be great since I'm new to both Core Data and Cocoa Bindings.

Paulo F. Andrade 52439@IST
mailto: email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.