background image
C H A P T E R 1 1
Data Storage and Retrieval
About Data Storage on Newton Devices
For information on using store objects, see "Using Stores" beginning on page 11-29.
A package is the basic unit of downloadable Newton software: it provides a means
of loading code, resources, objects, and scripts into a Newton device. Most Newton
applications are shipped as packages that can be installed on a Newton device by
applications such as Newton Package Installer or Newton Backup Utility.
Packages can be read from a data stream or directly from memory. For example,
Newton Connection Utility uses a data stream protocol to load a package into the
Newton system from a MacOS or Windows computer. However, it is much more
common to use packages directly from memory, as the user does after the package
has been installed on the Newton device.
For a more detailed discussion of packages, see "Parts" on page 12-3 in
Chapter 12, "Special-Purpose Objects for Data Storage and Retrieval."
This section provides important background information about soup objects. Topics
discussed here include
soups vs. union soups
related data structures such as soup definitions, indexes, index specification
frames, and tags
automatic creation of soups
saving user preferences in the system soup
Applications using soup-based data storage must respect the user's default store
preferences for writing soup entries and create soups only as necessary. The use of
union soups makes it easy to observe these requirements. Union soups provide
methods that respect the user's default store preferences automatically when adding
new entries. These ROM-based methods are also much faster than equivalent
NewtonScript code. Union soups also provide methods you can use on those
occasions when you must specify the store on which to save soup entries.
Another good reason to use union soups is that applications almost never need to
create them explicitly. Once a soup definition is registered with the system, individual
members of the union soup it defines are created automatically as needed.
A soup definition is a frame that provides information about a particular union
soup. The soup definition supplies descriptive information about the union soup
and information required to create its member soups.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна