Hey there, I used the default methods supplied by the Cocoa Core
Data Application project, I merely changed the store type:
- (NSPersistentStoreCoordinator *) persistentStoreCoordinator {
if (persistentStoreCoordinator != nil) {
return persistentStoreCoordinator;
}
NSFileManager *fileManager;
NSString *applicationSupportFolder = nil;
NSURL *url;
NSError *error;
fileManager = [NSFileManager defaultManager];
applicationSupportFolder = [self applicationSupportFolder];
if ( ![fileManager fileExistsAtPath:applicationSupportFolder
isDirectory:NULL] ) {
[fileManager createDirectoryAtPath:applicationSupportFolder
attributes:nil];
}
url = [NSURL fileURLWithPath: [applicationSupportFolder
stringByAppendingPathComponent: @"shadowClipboard_3.sclip"]];
persistentStoreCoordinator = [[NSPersistentStoreCoordinator
alloc] initWithManagedObjectModel: [self managedObjectModel]];
if (![persistentStoreCoordinator
addPersistentStoreWithType:NSSQLiteStoreType configuration:nil
URL:url options:nil error:&error]){
[[NSApplication sharedApplication] presentError:error];
}
return persistentStoreCoordinator;
}
Ben
On Aug 25, 2006, at 2:03 AM, email@hidden
wrote:
Message: 18
Date: Thu, 24 Aug 2006 19:01:45 -0500
From: Gerald Daniels <email@hidden>
Subject: Re: NSSQLiteStoreType and remove (REPOST)
To: Cocoa Developers <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; delsp=yes;
format=flowed
Ben,
Can you provide a code snippet from where you save your data or
maybe
more details?
---
Gerald Daniels
On Aug 23, 2006, at 3:42 PM, Benjámin Salánki wrote:
Hey dear List,
As noone answered my previous mail, I thought I would post it
again, because I'm pretty much stuck and would appreciate any
help.
I was writing my Cocoa CoreData Application using the default XML
store type, then I figured I would test how speed and disk
space is
affected by this and wanted to try NSSQLiteStoreType store
type. It
works great when I start the app, i can add records, remove them
and whatnot. Now when I quit and reload the app, the records
removed during the last time I ran the app are still present in
the
app. Do I have to do something different in regards to removing an
item when using NSSQLiteStoreType instead of the XML type?
Thanks,
Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden