background image
C H A P T E R 4
NewtApp Applications
About the NewtApp Framework
You can create most kinds of applications with the NewtApp framework. If your
application is similar to a data browser or editor, or if it implements an automated
form, you can save yourself a significant amount of time by using the NewtApp
If you're creating a specialized application (for example, a calculator) or if you
need to display more than one soup at a time, you shouldn't construct it with
NewtApp, but should use the protos described in other chapters of this book. These
chapters include Chapter 3, "Views," Chapter 6, "Pickers, Pop-up Views, and
Overviews," Chapter 7, "Controls and Other Protos," Chapter 8, "Text and Ink
Input and Display," Chapter 13, "Drawing and Graphics," Chapter 16, "Find," and
Chapter 15, "Filing."
Some NewtApp protos work in nonframework applications. For example, you may
want to update an existing application to take advantage of the functionality
provided by the NewtApp slot view protos. Updating requires a bit of retrofitting,
but it can be done. See "Using Slot Views in Non-NewtApp Applications"
(page 4-22) for an example.
When you use the NewtApp framework protos, your user interface is updated as
the protos change with new system software releases, thereby staying consistent
with the latest system changes. In addition, the built-in code that manages system
services for these protos is also automatically updated and maintained as the
system software advances.
A NewtApp-based application can present many different views of your data. For
example, the Show button displays different views of information; the New button
creates new formats for data input.
NewtApp applications use a programming device known as stationery--a
collective term for data definitions (known as dataDefs) and view definitions
(known as viewDefs)--to enable this feature. You should use viewDefs to add
different views of your data and dataDefs to create different data formats. Stationery
is documented in Chapter 5; its use in a NewtApp application is demonstrated in
this chapter.
The NewtApp Protos
When you put the application protos together in a programming environment like
Newton Toolkit and set the values of slots, the framework takes care of the rest.
Your applications automatically take advantage of extensive system management
functionality with little additional work on your part. For example, to include your
application in system-wide date searches, just set a slot in the base view of your
application called
. (See "newtApplication" (page 3-8) in Newton
Programmer's Reference.)
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна