getting and setting current popup button title

OK, I’m at my wit’s end. I’ve been making some revisions to one of my programs so it will save and load preferences. Surprisingly, it’s not the preferences that are giving me fits (per se), but rather the popup button that one of the preferences uses.

I’ve got it boiled down to 2 simple issues. When opening the application I check for and get prefs if they exist. When the user selects the “Preferences” menu item, I show a panel window with a popup button and a text box. Disregard the text box, it works.

The button, though, is SUPPOSED to set the current item to the value read from the defaults, but it doesn’t. After combing through this forum and the AS Studio guide, the best I can come up with (which isn’t working) is:

set title of popup button "mhFontMnu" of theObject to mhFontPrefVal as string

What do I need to do to get the menu changed to the current default value?

By the same token, getting the value from the button is not working either, and my pref value is becoming “undefined” where it was defined before I run this line:

set mhFontPrefVal to title of popup button "mhFontMnu" of window "mhPrefsWin"

HELP!:frowning: Save me before I take a hammer to my keyboard.

Model: iMac DV+ (450mhz), 384mb, 40gb HD
AppleScript: 1.9.1
Browser: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv: Gecko/20060214 Camino/1.0
Operating System: Mac OS X (10.2.x)

Works fine for me on OS X 10.4.6.

OK, this was a COLOSSAL DUH!

My own @$$%%^^& fault. I accidentally grabbed a combo box in IB instead of a popup and the differences were subtle enough that I’ve been fighting with it for 3 hours before I finally tried creating a new one and realized what I had done.

Say it with me…DUH