title: Changing Core Data Items crashes App
body: <p>I am running into another problem with my Iphone App which I just can't solve myself. 
  I implemented a kind of organizer functionality in my latest app. 
  There one can create appointments which are displayed in a tableview and persisted in a CoreDataStore. I use 4 classes:</p>
  
  <ul>
  <li>an overview where appointments are displayed</li>
  <li>a view with textfields to put in Values for place and name of appointment (create/edit view)</li>
  <li>a view with DatePicker to define start- and enddate</li>
  <li>a controller which handles creation and deletion of items using this methods:</li>
  </ul>
  
  <p>The code:</p>
  
  <pre><code>-(void)createAppointmentObjectWithDate:(NSDate *)
                    appointmentDate name:(NSString *)appointmentName 
                             description:(NSString *)appointmentDescription 
                                   eDate:(NSDate *)appointmentEndDate
  {
      NSManagedObjectContext *managedObjectContext = [[CoreDataManager sharedManager] managedObjectContext];
      AppointmentObject *newAppointmentObject = [NSEntityDescription insertNewObjectForEntityForName:AppointmentObjectEntityName
                                                                              inManagedObjectContext:managedObjectContext];    
      newAppointmentObject.appointmentName = appointmentName;
      newAppointmentObject.appointmentDescription = appointmentDescription;
      newAppointmentObject.appointmentDate = [appointmentDate earlierDate:appointmentEndDate];
      newAppointmentObject.appointmentEndDate = [appointmentEndDate laterDate:appointmentDate];   
  }
  
  -(void)deleteAppointmentObject:(AppointmentObject *)appointmentObject triggeredByUser:(BOOL)byUser{
      NSManagedObjectContext *managedObjectContext = [[CoreDataManager sharedManager]   managedObjectContext];
      [managedObjectContext deleteObject:appointmentObject];
  }
  </code></pre>
  
  <p>But all kind of crazy stuff is happening which makes my app crash with "SICBART" message:</p>
  
  <pre><code>2010-10-13 17:35:04.630 didacta[109:307] Serious application error.  Exception was      caught during Core Data change processing. 
  This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification.  
  -[CALayer controllerWillChangeContent:]: unrecognized selector sent to instance 0x19f150 with userInfo (null)
  2010-10-13 17:35:05.118 didacta[109:307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CALayer controllerWillChangeContent:]: unrecognized selector sent to instance 0x19f150'
  </code></pre>
  
  <p>errors appear while doing this:</p>
  
  <ul>
  <li>creating new Appointment and pressing "Done" (should trigger creation and pop overview)</li>
  <li>changing appointments and pressing "Done" (should send changes and pop overview)</li>
  <li>tapping on an appointment in overview ( should pop create/edit view and hand over values)</li>
  <li>deleting an item</li>
  </ul>
  
  <p>sometimes I can even delete an appointment but then the order of the items in the tableview is somehow gotten twisted so the index of the tableview isn't pointing to the index of the appointment anymore.</p>