title: UIPickerView, cannot get data from array
body: <p>I'm trying to learn how to use the UIPickerView, and I don't know why my alert view always prints the first element in the array (picker), vs anything else.  I have a button press defined for the picker as:</p>
  
  <pre><code>- (IBAction)buttonPressed {
      NSInteger row = [myPicker selectedRowInComponent:0];
      NSString *s = [myPickerData objectAtIndex:row];
      NSLog(@"%@", s);
      NSString *title = [[NSString alloc] initWithFormat:@"You selected, %@", s];
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title
                                                      message:@"Message"
                                                     delegate:nil
                                            cancelButtonTitle:@"ok"
                                            otherButtonTitles:nil];
      [alert show];
      [alert release];
      [title release];
  }
  </code></pre>
  
  <p>my array defined as:</p>
  
  <pre><code>- (void)viewDidLoad {
      [super viewDidLoad];
      NSArray *array = [[NSArray alloc] initWithObjects:@"0", @"1", @"2", nil];
      self.myPickerData = array;
      [array release];
  }
  </code></pre>
  
  <p>I log the outputs when the picker is changed, and the values do get changed to 0, 1, 2, accordingly.</p>
  
  <pre><code>- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
      NSLog(@"%@", [myPickerData objectAtIndex:row]);
  }
  </code></pre>
  
  <p>But the alert view never works.  So I'm unsure what I am doing wrong here.</p>