Apple Newton Utilities Uživatelská příručka Strana 159

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 942
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 158
CHAPTER 4
NewtApp Applications
Using NewtApp 4-21
frame containing slots with references to all the viewDef layout templates that
work with that dataDef.
The recommended way to name the corresponding
allDataDefs and
allViewDefs slots is to set the slot names to the data symbol constant,
as shown in the following code examples.
Set the
allDataDefs slot to return a frame with references to all the application’s
dataDefs, as follows:
result := {};
result.(kDataSymbol) := GetLayout("IOUDataDef");
// result.(kData2Symbol) := ... to add a 2nd DataDef
result;
Set the allViewDefs slot to return a frame with references to all the application’s
viewDefs, in a parallel manner, as shown in the following code:
result := {};
result.(kDataSymbol) := {
default: GetLayout("IOUDefaultViewDef"),
notes: GetLayout("IOUNotesViewDef"),
iouPrintFormat: GetLayout("IOUPrintFormat"),
// Use for routing (beaming, mailing, transports):
frameFormat: {_proto: protoFrameFormat},
};
// Use to add a 2nd DataDef:
// result.(kData2Symbol) := {...}
result;
A NewtApp application only accepts stationery when a dataDef has a
superSymbol with a value matching the value of the newtApplication
base view’s
superSymbol slot. For this reason you want the value of the
superSymbol slot to be a unique symbol. This sample application uses
the constant
kSuperSymbol, which is set to the application symbol
'|IOU:PIEDTS|, to set the superSymbol slot.
Using the Required NewtApp Install and Remove Scripts 4
An InstallScript function and RemoveScript function are required to
register your NewtApp application with the system for the various system services.
These scripts are boilerplate functions you should copy unaltered.
Zobrazit stránku 158
1 2 ... 154 155 156 157 158 159 160 161 162 163 164 ... 941 942

Komentáře k této Příručce

Žádné komentáře