• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Making changes in a Background thread with Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making changes in a Background thread with Core Data


  • Subject: Making changes in a Background thread with Core Data
  • From: "Paulo F. Andrade" <email@hidden>
  • Date: Wed, 9 May 2007 00:57:15 +0100

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:
This email sent to email@hidden


  • Prev by Date: Possible to Receive a Screenshot?
  • Next by Date: Keyed multi-values in Spotlight importer?
  • Previous by thread: Possible to Receive a Screenshot?
  • Next by thread: Keyed multi-values in Spotlight importer?
  • Index(es):
    • Date
    • Thread