Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fuhrj

macrumors newbie
Original poster
Aug 7, 2009
8
0
In IB, I created a NSPopupButton for the purpose of giving a list of options to the user. I removed the default item 1, item 2, etc. from NSMenu.

In my controller, I populate the control with the following code:

Code:
NSMutableArray *statusList = [[NSMutableArray alloc] init];
	
[statusList addObject:@"Open"];
[statusList addObject:@"Closed"];
[statusList addObject:@"On hold"];
	
[status addItemsWithTitles:statusList];

The control populates fine and I can see my three items. However, when I try to select an item, it always pops back to the first item in the list.

What would cause this? Am I binding incorrectly?

Many thanks :eek:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.