• 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
How to synchronize two managedObjectContexts...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to synchronize two managedObjectContexts...


  • Subject: How to synchronize two managedObjectContexts...
  • From: "Jon C. Munson II" <email@hidden>
  • Date: Wed, 1 Apr 2009 16:29:00 -0400
  • Organization: JTA Enterprises LLC

Namaste!

I'm having trouble with an implementation of drag-and-drop for a
core-data-based application.

Scenario:  I'm implementing the drag destination for file names coming from
an application (like Finder).  The receiving window will take the filenames
and create the appropriate records for the core-data entity that is the
basis of the window.

The drop isn't so much the issue, but rather what to do with it.

If there is a better way to do this, I'd appreciate hearing about it.

After trying:

1.  Adding to the array controller for that entity,
2.  Adding to the main managedObjectContext,
3.  Adding to a distinct managedObjectContext,

And finding that 1 & 2 weren't workable (didn't go too far with #1 as the
add method didn't do what I wanted, and #2 wouldn't create the default data
as stipulated by the class file for the entity and did a great deal of
hangtime), #3 works just fine (no crashes, and default data populates as
expected) EXCEPT I can't seem to get the secondary MOC to notify the primary
MOC of the additions.

I've seen the dox for -mergeChangesFromContextDidSaveNotification (and then
the refreshObject to follow), however, I could not find a complete example
of its implementation (where does that go, etc.).

So, I'm not sure where to go with this - I could use a good example or
better explanation.

Many thanks in advance!

Peace, Love, and Light,

/s/ Jon C. Munson II


_______________________________________________

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

  • Follow-Ups:
    • RE: How to synchronize two managedObjectContexts...
      • From: "Jon C. Munson II" <email@hidden>
  • Prev by Date: Re: Best Strategy to Control iTunes
  • Next by Date: Re: Saving Address Book for more than 1000 recrods
  • Previous by thread: re:Persistent store removal throwing invalidated NSManagedObject exceptions
  • Next by thread: RE: How to synchronize two managedObjectContexts...
  • Index(es):
    • Date
    • Thread