background image
C H A P T E R 4
NewtApp Applications
About the NewtApp Framework
4-5
About newtSoup
4
Application data is stored in persistent structures known as soups in any Newton
application. In a NewtApp application, soup definitions, written in the
newtApplication.allSoups
slot, must be based on the
newtSoup
proto.
Within a soup, data is stored in frames known as entries. In turn, entries contain the
individual slots in which you store your application's data. The data in these slots is
accessed by using a programming construct known as a cursor.
The
newtSoup
proto defines its own version of a set of the data storage objects
and methods. If you are not already familiar with these concepts and objects, you
should read the introductory parts of Chapter 11, "Data Storage and Retrieval,"
before trying to use the
newtSoup
proto.
The Layout Protos
4
Each NewtApp application must have two basic views of the application data,
known as layouts, which are:
an overview--seen when the Overview button is tapped
a default view--seen when the application is first opened
Three kinds of layouts correspond to three basic application styles:
the card (see
newtLayout
)
the continuous roll (see
newtRollLayout
)
the page (see
newtPageLayout
)
Card-based and roll-based applications differ in the number of entries each may
have visible at one time. The built-in Names application is a card-based application.
For this type of application, only one entry is displayed at a time. In contrast, the
built-in Notes application, which is a roll-based application, can have multiple
entries visible at once. They must be separated by a header, that incorporates Action
and Filing buttons to make it obvious to which entry a button action should apply.
Examples of card-based and a roll-based applications are shown in Figure 4-2.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна