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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to