title: how to sent selected value from second class to first class indexpath.row in iphone
body: <pre><code> I have two class `first` class and `second` class
  
  I have created 3 section on `tableview` cell for display different value
  If I select on section 0 and `indexpath.row` 0 then it push me on `second` class where I have all name list in `tableview` if i select any name then that name should display on first class on section 0  after it happen then i can sent this display value to server please help me on this
  what i have to write on second class this method:
  </code></pre>
  
  <p>when i add this code i get this error -[airport isEqualToString:]: unrecognized selector sent to instance 0x4e54760
  2011-09-16 16:44:37.693 RegexKitLiteDemo[36975:207] <em>*</em> Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[airport isEqualToString:]: unrecognized selector sent to instance 0x4e54760'</p>
  
  <pre><code>this is my Tfirst.m file
  
  
  
  - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
  {
      NSLog(@"accessory selected");
  
  
      if ([indexPath section] == 0)
      {
         // load the appropriate view for the accessory selected
          if ([indexPath row] == 0)
          {
              [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(nameControllerDidSelect:) name:NameControllerDidSelectNotification object:viewtwo];
  
              viewtwo=[[Originstart alloc]initWithNibName:@"Originstart" bundle:nil];
              [self.navigationController pushViewController:viewtwo animated:YES];
              [viewtwo release];
  }
          else{
              NSLog(@"accessory right");
              }
  
          //[self.navigationController pushViewController:self.approve animated:YES];
  
  
      }
  }
  
  
  
  
  
  
  my Origin.m file
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
      static NSString *CellIdentifier = @"Cell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if (cell == nil) {
          cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
      }
  
      a=(airport*)[app.lstAirports objectAtIndex:indexPath.row];
      NSLog(@"str:%@",a);
      cell.textLabel.text =a.Name;
  cell.detailTextLabel.text=a.Code;
      // Configure the cell...
  
      return cell;
  }
  
  
  
  
  #pragma mark -
  #pragma mark Table view delegate
  
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  
  
  
      a.Name = [app.lstAirports objectAtIndex:indexPath.row];
  
      // Send notification of new selection
      NSDictionary *userDict = [NSDictionary dictionaryWithObject:a.Name  forKey:@"Name"];
      NSLog(@"str:%@",userDict);
      [[NSNotificationCenter defaultCenter] postNotificationName:NameControllerDidSelectNotification object:self userInfo:userDict];
                   }
  </code></pre>