C H A P T E R 4
responsibility for its operation is 100% yours. If you are going to redistribute it,
you must make it clear in your source files that the code descended from
Apple-provided sample code and you have made changes.
The sample is an application for gathering data that supports the system services
routing, filing, and finding. It presents two views of the data to be collected: a
required default view; "IOU Info" (and an alternate "IOU Notes" view); and a
required overview. IOU Info and IOU Notes are stationery and appear as items in
the Show button's picker. In addition, it shows how to implement the application in
the three styles of NewtApp applications: card, page, and roll. See the DTS sample
code for details.
The application starts with three basic NTK layout files:
The application base view--a
A default layout--one of the layout protos.
An overview layout--either the
The application also contains the NTK layout files for the stationery, a dataDef,
and its two corresponding viewDefs:
The creation of these files is shown in Chapter 5, "Stationery."
A NewtApp application must include standard
functions. Any icons must be included with a resource file; the
. In the example, there is also a text file,
, in which application globals are defined. Neither the resource
file nor the text file is required.
The basic view slots,
are discussed in Chapter 3, "Views," and are called out in the samples only
when there is something unusual about them.
Using Application Globals
These samples use several application globals. When you use NTK as your
development system, they are defined in a definitions file, which we named
The values of the constants
are set to the
application symbol. They are used to set slots that must have unique identifying
symbols. You are not required to use the application symbol for this purpose, but it
is a good idea, because the application symbol is known to be unique.