Build Your First Application

Create a Layout with Templates

You create the templates that correspond to Newton views in NTK layout windows.

1. To create a layout window, select New Layout from the File menu.

2. NTK then displays an empty layout window along with a Tool Palette (see FIGURE 2.21). You create templates inside this layout by graphically dragging them out on the layout screen.

3. To begin, select protoApp in the palette by clicking on its icon or selecting it from the popup menu (see FIGURE 2.21).

4. Once the protoApp is selected, go to the layout window and drag out a rectangular shape (see FIGURE 2.22).

This template shape will correspond to the view displayed on the Newton; it will have the same dimensions and screen location.

FIGURE 2.21 : Empty layout window with tool palette.


All of the views that you have in your application are usually created in NTK as templates in these layout windows. For each template in your application, you go through the same twofold process:

FIGURE 2.22 : Creating a protoApp template.


An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996