Re: Core Data load document store without document for QuickLook plugin
Re: Core Data load document store without document for QuickLook plugin
- Subject: Re: Core Data load document store without document for QuickLook plugin
- From: mmalc crawford <email@hidden>
- Date: Fri, 21 Dec 2007 12:26:18 -0800
On Dec 21, 2007, at 12:16 PM, David Sinclair wrote:
Not sure. No non-Apple frameworks. In the app, I link against
Carbon, Cocoa, CoreFoundation, CoreServices, Foundation, AppKit,
ExceptionHandling, SystemConfiguration, AddressBook, CoreData, and
WebKit. The plugin wouldn't use several of those.
Which version of Mac OS X are you targeting?
As a first step, override managedObjectModel:
- (id)managedObjectModel
{
static id sharedModel = nil;
if (sharedModel == nil)
{
NSString *modelPath = [[NSBundle mainBundle]
pathForResource:@"MyDocument" ofType:@"mom"];
NSURL *modelURL = [NSURL fileURLWithPath:modelPath];
sharedModel = [[[NSManagedObjectModel alloc]
initWithContentsOfURL:modelURL] autorelease];
}
return sharedModel;
}
(written in Mail).
mmalc
_______________________________________________
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