Creating the application STCalculatorApp
The first step is to create an application component. An application is a Smalltalk component that holds functionally related classes in a single unit.
To create an application component follow these steps:
1. From the Transcript, select
Browse Applications from the
Tools menu. You will see a window like this:
2. In the Applications Browser, select Create > Application from the Applications menu.
3. In the dialog box, type STCalculatorApp and select OK.
4. If a dialog opens stating that STCalculatorApp already exists, select Yes and enter a different name (perhaps prefixed by your initials). The name of any application must begin with a capital letter and contain no spaces.
5. Now you can set the application's prerequisites from the new window that just opened. This determines which applications have to be loaded in your image before your application will run. All applications start out by having Kernel as a prerequisite. The graphical interface of STCalculatorApp uses the application CommonWidgets. To ensure that we have CommonWidgets as a prerequisite, do the following:
a. Select CommonWidgets from the Available list.
b. Select >>. Notice that Kernel disappeared from the right list. That is because CommonWidgets has Kernel as its own prerequisite, and this list shows only the immediate prerequitises for your application.
c. Select OK. The application CommonWidgets is now a prerequisite of STCalculatorApp.
That’s it. You should see STCalculatorApp in the Applications Browser.
Last modified date: 03/26/2020