• 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: Core Data, bindings and synchronizing.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data, bindings and synchronizing.


  • Subject: Re: Core Data, bindings and synchronizing.
  • From: Ryan Homer <email@hidden>
  • Date: Fri, 16 Feb 2007 08:56:33 -0500

Michael and mmalc,

Thanks for the responses. It seems like you're saying that I should try to use one managed object context. I guess I'm accustomed to trying to keep things private in my classes but with Cocoa, it seems you have to learn how to break out of that habit a bit.

On 12-Feb-07, at 4:23 PM, mmalc crawford wrote:


On Feb 12, 2007, at 10:23 AM, Ryan Homer wrote:

This does NOT automatically update my view because there are now two instances of the moc and each is in a different state. I have tried using a shared moc and this DOES indeed keep the view in sync with my background data changes, but I was wondering what solutions others have used in cases like this. One immediate "situation" that arises is that there is now no simply way to know when we are no longer using the moc and therefore release it from memory.

It's not clear why you wouldn't know when you're no longer using an object...

What I meant here was that the release of objects is usually done in the dealloc, but my dealloc would now have to be "smart" to know to release the moc only when it is the last surviving instance... hmmm, that would probably be [self retainCount] eh? :-)




Is anyone somehow keeping the two instances of the moc in sync?

Further to Michael's comment that you haven't given a good reason for maintaining two contexts:

<http://developer.apple.com/documentation/Cocoa/Conceptual/ CoreData/Articles/cdChangeManagement.html>

Thanks for the link. I've never come across this doc before.

_______________________________________________

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


  • Follow-Ups:
    • Re: Core Data, bindings and synchronizing.
      • From: Jim Correia <email@hidden>
References: 
 >Core Data, bindings and synchronizing. (From: Ryan Homer <email@hidden>)
 >Re: Core Data, bindings and synchronizing. (From: mmalc crawford <email@hidden>)

  • Prev by Date: How to get a NSPopUpButtonCell bound to a CoreData attribute?
  • Next by Date: Re: Core Data, bindings and synchronizing.
  • Previous by thread: Re: Core Data, bindings and synchronizing.
  • Next by thread: Re: Core Data, bindings and synchronizing.
  • Index(es):
    • Date
    • Thread