
Bookstore Inventory
1. Draw a newtLabelInputLine as a child of the newtEntryView. Set the following slots:
pathauthor
labelAuthor"
pathtitle
labelTitle"
pathacquireDate
labelAcquired"
flavor// use short rather than long
// format for date
{
_proto: newtDateFilter,
shortFormat: kFormatDefault,
longFormat: nil,
}
pathnumberInStock
label# in stock"
flavor// make sure numberInStock is
// stored as integer rather than
// as a real number
newtIntegerFilter
pathprice
label$"
flavor// make sure price is displayed
// with two digits after decimal
// place
{
_proto: newtNumberFilter,
format: "%0.2f",
}

FIGURE 10.12 : Bookstore application as a minimal NewtApp.
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996