title: Build error: Assigning to 'id<UIPickerViewDataSource>' from incompatible type 'NSArray *'
body: <p>I have a <code>UIPickerView</code> that I am trying to set the datasource for; once the <code>datasource</code> is set, I place it into a modal popover to be displayed. Here is the code - manicuristArray is defined as <code>NSArray</code>, pvManicurist is the <code>UIPickerView</code>, all of the delegates for <code>UIPickerView</code> have been set correctly, as per samples I have found on SO):</p>
  
  <pre><code>    -(void) showModalManicurist:(int)tag {
  
      UIViewController* popoverContent = [[UIViewController alloc] init];
  
      UIView *popoverView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 216)];
      popoverView.backgroundColor = [UIColor redColor];
      popoverContent.contentSizeForViewInPopover = CGSizeMake(300.0, 216.0);
  
      //  define the UIPickerView
      pvManicurist.frame = CGRectMake(0, 0, 300, 216);
  
      //  fill the names from the d/b into manicuristArray
      PreferenceData *pv = [PreferenceData MR_findFirst];  //  (everything is in one record)
      NSLog(@"pv.aStaffPos1: %@", pv.aStaffPos1);
  
      if(pv)  {   //  fill the UIPickerView
          self.manicuristArray = [[NSArray alloc] initWithObjects: pv.aStaffPos1, pv.aStaffPos2, pv.aStaffPos3, pv.aStaffPos4, pv.aStaffPos5,
                             pv.aStaffPos6, nil];
          NSLog(@"\nmanicuristArray.count: %d",manicuristArray.count);
  
          pvManicurist.dataSource = self.manicuristArray;        [pvManicurist reloadAllComponents];
  
       }
  
      //  add it to the popover
      [popoverView addSubview:pvManicurist];
      popoverContent.view = popoverView;
      popoverController = [[UIPopoverController alloc] initWithContentViewController:popoverContent];
      popoverController.delegate = (id)self;
      [popoverController setPopoverContentSize:CGSizeMake(300, 216) animated:NO];
  
      //  show it below the staff name textbox
      [popoverController presentPopoverFromRect:boStaff.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp
                                       animated:YES];
  }
  </code></pre>
  
  <p>The problem is I am getting this build warning: </p>
  
  <blockquote>
    <p>Build error: Assigning to 'id' from incompatible type 'NSArray *'</p>
  </blockquote>
  
  <p>which I believe is causing the <code>UIPicker</code> view not to be put into the <code>UIPopover</code>.  I have several other popovers, all with <code>UIDatePickers</code> in them, and they work fine.  I have looked on SO and Google and found nothing that answers this particular question, which is: why is this not working? and how do I fix the build error?</p>
  
  <p><strong>UPDATE:  here are the delegate methods for UIPickerView:</strong></p>
  
  <pre><code>//--  sets number of columns
  -(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pvManicurist  {
  
      return 1; // One column
  }
  
  //--  sets count of manicuristArray
  -(NSInteger)pickerView:(UIPickerView *)pvManicurist numberOfRowsInComponent:(NSInteger)component  {
  
      return manicuristArray.count;  //set number of rows
  }
  
  //--  sets the component with the values of the manicuristArray
  -(NSString *)pickerView:(UIPickerView *)pvManicurist titleForRow:(NSInteger)row forComponent:(NSInteger)component  {
  
      return [manicuristArray objectAtIndex:row];  //set item per row
  }
  </code></pre>
  
  <p>And here is the interface from the .h file:</p>
  
  <pre><code>@interface AppointmentsViewController : UIViewController &lt;UITableViewDataSource, UITableViewDelegate, UINavigationControllerDelegate, UIActionSheetDelegate, UITextFieldDelegate,UIPickerViewDelegate, UIPickerViewDataSource  &gt;  {
  </code></pre>