Apple Newton Utilities Guide de l'utilisateur Page 151

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 150
CHAPTER 4
NewtApp Applications
Using NewtApp 4-13
responsibility for its operation is 100% yours. If you are going to redistribute it,
you must make it clear in your source les 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, ling, and nding. 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 les:
The application base view—a newtApplication proto.
A default layout—one of the layout protos.
An overview layout—either the newtOverLayout or
newtRollOverLayout proto.
The application also contains the NTK layout les for the stationery, a dataDef,
and its two corresponding viewDefs:
iouDataDef
iouDefaultViewDef
iouNotesViewDef
The creation of these les is shown in Chapter 5, “Stationery.
A NewtApp application must include standard
InstallScript and
RemoveScript functions. Any icons must be included with a resource file; the
example uses
CardStarter.rsrc. In the example, there is also a text le,
Definitions.f, in which application globals are defined. Neither the resource
le nor the text le is required.
The basic view slots, viewBounds, viewFlags, and viewJustify,
are discussed in Chapter 3, “Views,” and are called out in the samples only
when there is something unusual about them.
Using Application Globals 4
These samples use several application globals. When you use NTK as your
development system, they are dened in a denitions le, which we named
Definitions.f.
The values of the constants
kSuperSymbol and kDataSymbol 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.
Vue de la page 150
1 2 ... 146 147 148 149 150 151 152 153 154 155 156 ... 941 942

Commentaires sur ces manuels

Pas de commentaire