Apple Newton Utilities Guide de l'utilisateur Page 187

  • 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 186
CHAPTER 5
Stationery
Using Stationery 5-5
Getting Information about Stationery 5
By using the appropriate global function, you can get information about all the
dataDefs and viewDefs that have been registered and thus are part of the system
registry. These functions include GetDefs, GetDataDefs, GetAppDataDefs,
GetViewDefs, and so on. For details on these functions, see Newton
Programmers Reference.
You can also obtain application-specic stationery information. This enables
applications that are registered for stationery to be extended by other developers.
Compatibility Information 5
The stationery feature and programming interface is new in Newton OS version
2.0. It is not supported on earlier system versions.
Using Stationery 5
Stationery allows you to:
Create discrete data denitions and view denitions.
Extend your own and other applications.
Create print formats.
Designing Stationery 5
Whether you use stationery in an application or an auto part, it is important to keep
the data and view denitions as discrete as possible. Encapsulating them, by
keeping all references conned to the code in the data or view denition, will make
them maximally reusable.
You should keep in mind that these extensions may be used in any number of
future programming situations that you cannot foresee. If your stationery was
created for an application (which you may have written at the same time), resist
any and all urges to make references to structures contained in that application,
thereby “hard-wiring” it to depend on that application. In addition, you should
provide public interfaces to any values you want to share outside the dataDef.
If your stationery is designed for a NewtApp, the stationery soup entries, which are
dened in the dataDef component of stationery, are adopted into the soup of a
NewtApp application (via the
AdoptEntry method) so that your stationery’s slots
are added to those already dened in the main application. This allows the
stationery and the host application to have discrete soup structures. See the
description of
AdoptEntry (page 3-5) in Newton Programmers Reference.
Vue de la page 186
1 2 ... 182 183 184 185 186 187 188 189 190 191 192 ... 941 942

Commentaires sur ces manuels

Pas de commentaire