Re: NSSQLiteStoreType and remove (REPOST)
Re: NSSQLiteStoreType and remove (REPOST)
- Subject: Re: NSSQLiteStoreType and remove (REPOST)
- From: Benjamin Salanki <email@hidden>
- Date: Fri, 25 Aug 2006 10:21:28 +0200
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