title: Viewcontroller length unrecognized selector sent to instance in iphone
body: <p>My application crashing ans showing following in console. How to remove this exception???</p>
  
  <pre><code>2011-11-25 17:47:56.519 ShowroomLocator[1482:707] -[ShowroomLocatorViewController length]: unrecognized selector sent to instance 0x164860
  2011-11-25 17:47:56.541 ShowroomLocator[1482:707] *** Terminating app due to     uncaught exception 'NSInvalidArgumentException', reason: '-    [ShowroomLocatorViewController length]: unrecognized selector sent to instance   0x164860'
    *** Call stack at first throw:
  (
  0   CoreFoundation                      0x308aa64f __exceptionPreprocess + 114
  1   libobjc.A.dylib                     0x3400bc5d objc_exception_throw + 24
  2   CoreFoundation                      0x308ae1bf -[NSObject(NSObject)  doesNotRecognizeSelector:] + 102
  3   CoreFoundation                      0x308ad649 ___forwarding___ + 508
  4   CoreFoundation                      0x30824180 _CF_forwarding_prep_0 + 48
  5   UIKit                               0x35dcfed1 - [UITableView(UITableViewInternal) _delegateWantsHeaderForSection:] + 228
  6   UIKit                               0x35dcf2db -[UISectionRowData  refreshWithSection:tableView:tableViewRowData:] + 78
  7   UIKit                               0x35dcf225 -[UITableViewRowData  numberOfRows] + 72
  8   UIKit                               0x35dcec73 -[UITableView  noteNumberOfRowsChanged] + 82
  9   UIKit                               0x35dce7f7 -[UITableView reloadData] + 582
  10  HettichShowroomLocator              0x00003487 - [ShowroomLocatorViewController viewWillAppear:] + 50
  11  UIKit                               0x35dbf1d9 -[UIViewController  viewWillMoveToWindow:] + 64
  12  UIKit                               0x35d9e179 -[UIView(Hierarchy)   _willMoveToWindow:withAncestorView:] + 132
  13  UIKit                               0x35d83a59 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 228
  14  UIKit                               0x35d8396b -[UIView(Hierarchy) addSubview:] + 22
  15  UIKit                               0x35db335f -[UIWindow addRootViewControllerViewIfPossible] + 202
  16  UIKit                               0x35daf333 -[UIWindow _setHidden:forced:] + 182
  17  UIKit                               0x35db328f -[UIWindow _orderFrontWithoutMakingKey] + 18
  18  UIKit                               0x35dc1c61 -[UIWindow makeKeyAndVisible] + 16
  19  ShowroomLocator              0x0000285b - [ShowroomLocatorAppDelegate application:didFinishLaunchingWithOptions:] + 162
  20  UIKit                               0x35db3821 -[UIApplication  _callInitializationDelegatesForURL:payload:suspended:] + 772
  21  UIKit                               0x35dadb65 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 272
  22  UIKit                               0x35d827d7 -[UIApplication  handleEvent:withNewEvent:] + 1114
  23  UIKit                               0x35d82215 -[UIApplication sendEvent:] + 44
  24  UIKit                               0x35d81c53 _UIApplicationHandleEvent + 5090
  25  GraphicsServices                    0x35a56e77 PurpleEventCallback + 666
  26  CoreFoundation                      0x30881a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
  27  CoreFoundation                      0x3088383f __CFRunLoopDoSource1 + 166
  28  CoreFoundation                      0x3088460d __CFRunLoopRun + 520
  29  CoreFoundation                      0x30814ec3 CFRunLoopRunSpecific + 230
  30  CoreFoundation                      0x30814dcb CFRunLoopRunInMode + 58
  31  UIKit                               0x35dacd49 -[UIApplication _run] + 372
  32  UIKit                               0x35daa807 UIApplicationMain + 670
  33  ShowroomLocator              0x0000278b main + 70
  34 ShowroomLocator              0x00002740 start + 40
  )
  terminate called after throwing an instance of 'NSException'
  Program received signal:  “SIGABRT”.
  warning: Unable to read symbols for   /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.2  (8H7)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
  (gdb) 
  </code></pre>
  
  <p>After adding SearchDisplayController with _tableview1 my application started crashing. 
  I have two tableview in same controller class. Pleas suggest something to handle this...</p>
  
  <p><strong>Edited with multiple tableview coding:</strong></p>
  
  <pre><code> - (void)viewDidLoad {
  appDelegate = (ShowroomLocatorAppDelegate *)[[UIApplication sharedApplication]  delegate];
  
  NSArray *items = [[NSArray alloc] initWithObjects:
                    @"Sydney Airport (SYD), Mascot NSW 2020, Australia",
                    @"Sydney NSW, Australia'",
                    @"Smithfield NSW 2164, Australia",
                    @"Smithfield SA 5114, Australia",
                    @"Smithfield QLD 4878, Australia",
                    nil];
  
  self.allItems = items;
  [items release];
      self._tableView1.scrollEnabled = YES;
  _tableView1.hidden = YES;
  _tableView.hidden = YES;
  [self._tableView reloadData];
  
  self._tableView.rowHeight = 80.0;
  [ self.view addSubview:_tableView] ;
  _tableView.delegate = self;
  _tableView.dataSource = self;
  _tableView1.delegate = self;
  _tableView1.dataSource = self;
  }
  - (void)viewWillAppear:(BOOL)animated 
  {
  [self._tableView reloadData];
  [self._tableView1 reloadData];  }
  
  
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  if(tableView ==_tableView &amp;&amp; tableView ==_tableView1  )
  {
      return 1;
  }
   }
  
  - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section   {
  if(tableView ==_tableView )
  {
  if(section == 0)
      return [NSString stringWithFormat:NSLocalizedString(@"ShowRooms[%d]", @"Showroom format"), [appDelegate.markers count]];
  
  }
   }
  
  
  
  // Customize the number of rows in the table view.
  - (NSInteger)tableView:(UITableView *)tableview numberOfRowsInSection:(NSInteger)section {
  
  if(tableview ==_tableView )
  {
  return [appDelegate.markers count];
  }
  if(tableview ==_tableView1 )
  { NSInteger rows = 0;
  
  if ([_tableView1 
       isEqual:self.searchDisplayController.searchResultsTableView]){
      rows = [self.searchResults count];
  }
  else{
      rows = [self.allItems count];
  }
  
  return rows;
  }
    }
  </code></pre>
  
  <p>In my _tableview web-service data get fill and _tableview1 array data with address get fill.....
  The above error is coming on adding _tableview1..... </p>