title: iphone/ipad with 2 side by side tables
body: <p>I want to create a landscape view with 2 table views side by side, using separate table controllers.</p>
  
  <p>When I select a row, I want to move that selection to the other table. Initially I wanted an array, but I couldn't pass the array to the other controller. The array was a property of the table view controller. </p>
  
  <p>I then tried to write the selection to core data, but that is crashing. To simplify, I have 2 entities in core data, Person (with name attribute and to one relationship) and SelectedPerson (with just the to one relationship to Person).</p>
  
  <p>I have added the following:</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
      Person *person = (Person *)[fetchedResultsController objectAtIndexPath:indexPath];
      SelectedPerson *selectedPerson = [NSEntityDescription insertNewObjectForEntityForName:@"SelectedPerson"
                                inManagedObjectContext:managedObjectContext];
      [selectedPerson setValue:person forKey:@"persons"];
      [leftViewController.tableView reloadData];
      NSLog(@"Selection saved OK");
  </code></pre>
  
  <p>If I temporarily delete my left controller from the nib, this works fine and when I add it back, it opens with the selected persons. But with the left table view, I get the following crash log:</p>
  
  <pre><code>[49650:207] Record saved OK
  [49650:207]-[Person compare:]: unrecognized selector sent to instance
  [49650:207] Serious application error.  Exception was caught during Core Data change processing: -[Person compare:]: unrecognized selector sent to instance 0x3d33ef0 with userInfo (null)
  </code></pre>
  
  <p>***I have uploaded a sample application here <a href="http://www.mediafire.com/file/zzldm1nmt2m/PersonsSample.zip" rel="nofollow noreferrer">link text</a></p>
  
  <p>I've seen apps that use side by side tables, but I'm struggling to get this working. Any help would be greatly appreciated.</p>