Guide to Creating a Minimal NewtApp

Application Layer

2. Create a layout file.

3. Draw a newtApplication in the layout file. Remove the following slots: afterScript, allDataDefs, allViewDefs, superSymbol as they are used for stationery support (see FIGURE 10.7). Set the following slots to these values:

allLayouts
{
default: GetLayout("Default.t"),
overview: GetLayout("Overview.t"),
}

allSoups
{
mySoup: {
_proto: newtSoup,
soupName: "Temporary soup",
soupIndices: [],
soupQuery: {},
},
}

appAll
"All Items"

appObject
["Item", "Items"]

appSymbol
kAppSymbol

title
kAppName

FIGURE 10.7 : Initial slots to remove from NewtApplication.


4. Draw a newtClockFolderTab or newtFolderTab as a child of the newtApplication (see FIGURE 10.8).

FIGURE 10.8 : NewtApplication with newtStatusBar and newtClockFolderTab as children.


5. Draw a newtStatusBar as a child of the newtApplication (see FIGURE 10.8). Set the following slots:

menuLeftButtons:
[newtInfoButton]

menuRightButtons:
[newtActionButton, newtFilingButton]

6. Save the layout file (perhaps as "Main.t") and add it to the project.


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

Last modified: 1 DEC 1996