I have created my NSPopUpButton programmatically with the following code
[myPopUpButton insertItemWithTitle:@"--Select one--" atIndex:0];
[myPopUpButton addItemsWithTitles:[NSArray arrayWithObjects:@"1.One",@"Two",@"Three", nil]];
[myPopUpButton sizeToFit];
[myPopUpButton setAction:@selector(popUpAction:)];
[fullBrowserView addSubview: myPopUpButton];
//PopUp Action
-(void)popUpAction:(id)sender
{
NSLog(@"popUpAction");
}
When I click the popUpButton,menu items of popUpButton are disabled. When I use interfacebuilder,just it is working fine with the IBAction.
Why this setAction is not working for NSPopUpButton?