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! 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:1.8.0.1) Gecko/20060214 Camino/1.0
Operating System: Mac OS X (10.2.x)