Opening New Windows (?)

I’m trying to expand on the Currency Converter app which is included in Developer’s Tools. The idea is that instead of the user having to enter the rate every time, they should be able to enter the rate somewhere else, like a preference, and it should be saved until they change it again. I figure that the easiest way to do is to have a new window open with a text field for them to enter the rate and a button to save it. But, as I’m not very experienced, I’ve run into some issues, and I was hoping someone here might be able to help me:

  1. Should I use a new window or a drawer or what, and why am I having so much trouble getting anything to open as the result of a button click.
  2. what kind of script to I need in order to get user-supplied data (the rate) as a variable in the app?
  3. Any other suggestions?
    If you could help me, I’d be forever grateful!

You can use either a drawer or a window. Adding a window should be easier as their is no extra interface linking that needs to be done in IB (other than buttons for opening the window and saving the data). I don’t know why you are having problems with the button click.

Read the section about user defaults and default entries in the Applescript Studio Reference Guide. These sections will show you how to save/retrieve your preferences data.

Hope this helps,
Brad Bumgarner, CTA