• 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 11:16:19 +0200

Benjamin,

In the array controller do you just bind to managedObjectContext or also to contentSet? If you bind to contentSet make user you enable the "deletes objects on remove" option, otherwise the objects are just removed from the internal array.

Diederik



On 25-aug-2006, at 10:21, Benjamin Salanki wrote:

Diederik,

I have set up my table view to intercept the backspace and forward delete keys and then call the delete: or remove: (i'm not at my computer right now, don't know the name of the method) method of an instantiated NSArrayController programmatically.

Ben

On Friday, August 25, 2006, at 09:56AM, Diederik Hoogenboom <email@hidden> wrote:

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>)
 >Re: NSSQLiteStoreType and remove (REPOST) (From: Diederik Hoogenboom <email@hidden>)
 >Re: NSSQLiteStoreType and remove (REPOST) (From: Benjamin Salanki <email@hidden>)

  • Prev by Date: Core Data document-based app design decision?
  • Next by Date: Re: NSSQLiteStoreType and remove (REPOST)
  • Previous by thread: Re: NSSQLiteStoreType and remove (REPOST)
  • Next by thread: Re: NSSQLiteStoreType and remove (REPOST)
  • Index(es):
    • Date
    • Thread