Q:  How do I set the current selection on a Popup?

A:  In Release 2 and later, InterfaceBuilder has an object on the palette that presents a popup menu of choices.  This is actually a button (when you ask InterfaceBuilder for the class of this object,  sure enough, it's a button).  It's a special button whose target is a PopUpList and action causes the popup menu to be displayed.  There is no special message for setting the current selection of this popup,  all you do is set the title to be the choice you want to set your popup to, as you would for an ordinary Button.  So, if you have an outlet for a popup called "popUpButton" you can do this:

	[popUpButton  setTitle:"Item2"];

To get the number of the item currently selected, you have to send the indexOfItem: message to the PopUpList (which is the target of the popup Button).  So, with the example above, you would use:

	num=[[popUpButton  target]  indexOfItem:[popUpButton title]];

QA639

Valid for 2.0, 3.0