cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From torehal...@apache.org
Subject svn commit: r453018 - /incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYArrayController.m
Date Wed, 04 Oct 2006 20:49:49 GMT
Author: torehalset
Date: Wed Oct  4 13:49:48 2006
New Revision: 453018

URL: http://svn.apache.org/viewvc?view=rev&rev=453018
Log:
made CAYArrayController removal work without the controller
knowing the objectContext

Modified:
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYArrayController.m

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYArrayController.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYArrayController.m?view=diff&rev=453018&r1=453017&r2=453018
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYArrayController.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYArrayController.m Wed Oct  4 13:49:48
2006
@@ -54,7 +54,7 @@
     
     // remember objects to delete for later
     NSMutableArray *objectsToDelete = [NSMutableArray array];
-    if([self objectContext] && [self deleteObjectOnRemove])
+    if([self deleteObjectOnRemove])
     {
         [objectsToDelete addObjectsFromArray:[self selectedObjects]];
     }
@@ -63,13 +63,13 @@
     [super remove:sender];
     
     // delete objects if any
-    if([self objectContext] && [self deleteObjectOnRemove])
+    if([self deleteObjectOnRemove])
     {
         NSEnumerator *enumerator = [objectsToDelete objectEnumerator];
         CAYPersistentObject *element = nil;
         while(element = [enumerator nextObject])
         {
-            [[self objectContext] deleteObject:element];
+            [[element objectContext] deleteObject:element];
         }
     }
 }



Mime
View raw message