• 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
Re: NSTableView, NSArrayController, NSManagedObjectContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView, NSArrayController, NSManagedObjectContext


  • Subject: Re: NSTableView, NSArrayController, NSManagedObjectContext
  • From: mmalc crawford <email@hidden>
  • Date: Tue, 1 Jan 2008 09:48:07 -0800


On Jan 1, 2008, at 9:38 AM, Ture Pålsson wrote:

In the thread that adds the objects, I do [moc save: &saveError] every
now and then.

I subscribe to NSManagedObjectContextDidSaveNotification. In the
notification handler, I extract the object ID:s of the inserted
objects and pass them to a method on the main thread (using
performSelectorOnMainThread). On the main thread, I loop over the
objectID:s and... well, what *should* I be doing here? I tried just
accessing the objects with [moc objectWithID:]. No luck. I tried
calling [moc refreshObject: mergeChanges:] for the objects I got by
objectByID. No luck. I tried executing fetch requests for those
objects. No luck.

Are you actually getting back the new objects when you execute the fetch?

Are you sending the array controller a fetch: message?

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>)
 >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: mmalc crawford <email@hidden>)
 >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>)

  • Prev by Date: Re: NSTableView, NSArrayController, NSManagedObjectContext
  • Next by Date: Re: NSTableView, NSArrayController, NSManagedObjectContext
  • Previous by thread: Re: NSTableView, NSArrayController, NSManagedObjectContext
  • Next by thread: Bindings: NSArrayController <> Shared User Defaults - more detailed
  • Index(es):
    • Date
    • Thread