Adding a New viewDef to a Stationery-Based Application
1. In order to have layout-specific buttons, we've got to name and declare the newtStatusBar. Name the newtApplication template "theApplication". Name the newtStatusBar "theStatusBar" and declare it to "theApplication". Now, add to the newtApplication a new slot called statusBarSlot
. Make sure its value is
'theStatusBar
2. Copy the menuLeftButtons
slot from the newtStatusBar to the newtLayout in "Default.t". (Make sure the file "sortButton.t" is processed before Default.t) Add another item to the array in this slot:
[ newtInfoButton, GetLayout("sortButton.t"), newtNewStationeryButton, newtShowStationeryButton, ]If you build and download now, you'll find the default layout has a Show button which does absolutely nothing (when there's only one viewDef to show, tapping on Show shows it).
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996