Yesterday I created an AS Studio interface to my dictionary scripts. It took most of the day, lots of mistakes and redos. I always feel a little beaten up after doing something new like this. I got the various popup menus and text views working with one exception – the search field. Is it possible in AS Studio to create a drop down menu to select the field to search a la Mail’s search field?
The main question I have now is how to make my app quit when I close its window. How do you do that?
I think I may have started with a document-based app and switched to a single window (it was a long day). Plus, I experimented with connecting different scripts to certain IB structures and may have done something that prevents me from getting the on-should-quit script from working. Was I supposed to connect an interface element to that script?
No, all you have to do is add the “should quit after last window closed” handler to the application (File’s Owner) in IB and then in your main script, return true from the handler itself:
on should quit after last window closed theObject
return true
end should quit after last window closed