Core Data load document store without document for QuickLook plugin
Core Data load document store without document for QuickLook plugin
- Subject: Core Data load document store without document for QuickLook plugin
- From: David Sinclair <email@hidden>
- Date: Fri, 21 Dec 2007 11:32:38 -0800
I have a Core Data project that uses a NSPersistentDocument subclass,
which works fine. But I'm trying to write a QuickLook plugin for it,
and want to open the data store directly. When I do, it fails when
trying to load the store. Specifically, the -
addPersistentStoreWithType::: call below fails:
persistentStoreCoordinator = [[NSPersistentStoreCoordinator
alloc] initWithManagedObjectModel:[self managedObjectModel]];
NSPersistentStore *store = [persistentStoreCoordinator
addPersistentStoreWithType:NSBinaryStoreType configuration:nil URL:url
options:nil error:&error];
It gives the error "The model configuration used to open the store is
incompatible with the one that was used to create the store." I'm
using the same xcdatamodel file as for the main app. Does
NSPersistentDocument pass something for the configuration argument?
Alternatively, would it be feasible to write another
NSPersistentDocument subclass and use that to load the document
manually in the QuickLook plugin?
--
David Sinclair, Dejal Systems, LLC - email@hidden
Dejal blog - http://www.dejal.com/blog/
Cocoa code - http://www.dejal.com/developer/
Now on Twitter - http://twitter.com/dejal/
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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