Bookstore Inventory
1. Draw a newtLabelInputLine as a child of the newtEntryView. Set the following slots:
path
author
label
Author
"
path
title
label
Title
"
path
acquireDate
label
Acquired
"
flavor
// use short rather than long
// format for date
{
_proto: newtDateFilter,
shortFormat: kFormatDefault,
longFormat: nil,
}
path
numberInStock
label
# in stock
"
flavor
// make sure numberInStock is
// stored as integer rather than
// as a real number
newtIntegerFilter
path
price
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