title: Setting Actions for PopUpButton
body: <p>I have created an NSPopUpButton programmatically and I made an array for my choices, how can I create a setAction for each individual array choice? Thanks!</p>
  
  <pre><code>NSRect buttonRect = NSMakeRect(1705, 145, 78, 50); 
  
      //Button Array.  When I pick the choice it closes the diologue box
      NSArray *newArray;
      NSString *color1 = @"Blue Color";
      NSString *color2 = @"Green Color";
      NSString *color3 = @"Clear Color";
  
      newArray = [NSArray arrayWithObjects: color1, color2, color3, nil];
  
      NSPopUpButton *button = [[NSPopUpButton alloc] initWithFrame:buttonRect pullsDown:YES];
      [self addSubview:button];
      [button addItemsWithTitles:newArray];
      //want my action for each individual string
      [button setAction:@selector(changeFilterColor)];
  
  -(void) changeFilterColor
  {
      NSLog(@"colorChanged");
  
  }
  </code></pre>