• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSSQLiteStoreType and remove (REPOST)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSQLiteStoreType and remove (REPOST)


  • Subject: Re: NSSQLiteStoreType and remove (REPOST)
  • From: Diederik Hoogenboom <email@hidden>
  • Date: Fri, 25 Aug 2006 09:56:19 +0200

Benjamin,

How did you remove the objects? Using an object controller or via NSManagedObjectContext -deleteObject:?

Diederik

On 25-aug-2006, at 8:08, Benjámin Salánki wrote:

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

_______________________________________________ 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
  • Follow-Ups:
    • Re: NSSQLiteStoreType and remove (REPOST)
      • From: Benjamin Salanki <email@hidden>
References: 
 >Re: NSSQLiteStoreType and remove (REPOST) (From: Benjámin Salánki <email@hidden>)

  • Prev by Date: NSButton Bindings
  • Next by Date: RE: Problem in scrolling a window.
  • Previous by thread: Re: NSSQLiteStoreType and remove (REPOST)
  • Next by thread: Re: NSSQLiteStoreType and remove (REPOST)
  • Index(es):
    • Date
    • Thread