Re: Core Data concurrency during import of folder contents
Re: Core Data concurrency during import of folder contents
- Subject: Re: Core Data concurrency during import of folder contents
- From: Steve Mills <email@hidden>
- Date: Mon, 02 Feb 2015 14:25:56 -0600
On Jan 31, 2015, at 12:00:03, Jerry Krinock <email@hidden> wrote:
>
>
>
> I liked this one [1] by Aaron Douglas (all in Swift) when I was needed to do a presentation on Core Data last September. And then, in a rage of NIH [2], I wrote my own [3] instead, in Objective-C. The one Swift alternative file in there is still untested :))
>
> Finally, always check Ray Wenderlich’s site [4] when you want sample code.
>
> 1. https://github.com/astralbodies/CoreDataConcurrencyDemo/tree/master/CoreDataConcurrencyDemo
> 2. http://en.wikipedia.org/wiki/Not_invented_here
> 3. https://github.com/jerrykrinock/YaBT-Yet-another-Bug-Tracker
> 4. http://www.raywenderlich.com
I'm having a hard time figuring out how to make this work with an NSPersistentDocument. All the examples I've looked at are for iOS, so they all set up their own complete Core Data stack. What I'm trying to do - based on these examples - is to override the document's managedObjectContext method, which is where I'll create the NSMainQueueConcurrencyType MOC, and set its parent to the NSPrivateQueueConcurrencyType "root" MOC. But in order to create the root MOC, I need to get at the NSPersistentDocument's NSPersistentStoreCoordinator, but there is no method or property to get at that. Do I just create my own NSPersistentStoreCoordinator instead, like the iOS examples do?
--
Steve Mills
Drummer, Mac geek
_______________________________________________
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