background image
C H A P T E R 5
Stationery
Using Stationery
5-7
newEntry.class := kDataSymbol;
newEntry.viewStationery := kDataSymbol;
newEntry.(kDataSymbol).dueDate:=time();
newEntry;
end;
Extending the Notes Application
5
You may extend an existing application, such as the built-in Notes application, by
adding your own stationery. This is done by building and downloading an NTK
auto part that defines your stationery extensions.
The sample project used to illustrate many of the following sections consists of
these files, in the processing order shown:
ExtendNotes.rsrc
ExtendNotes Definitions.f
iouDataDef
iouDefaultViewDef
iouPrintFormat
ExtendNotes Install & Remove.f
Of these, the
iouDataDef
,
iouDefaultViewDef
, and
ExtendNotes
Install & Remove.f
files are used in the examples in this chapter. The
resource file (
ExtendNotes.rsrc
) contains the icon that is displayed next to the
dataDef name in the New menu (as shown in Figure 5-1). The definitions file
(
ExtendNotes Definitions.f
) is the file in which the constants, some of
which are used in examples, are defined. Finally, the
iouPrintFormat
file
defines a print format for the stationery.
Determining the SuperSymbol of the Host
5
Using stationery requires the presence of a matching
superSymbol
slot in both
the host application and the dataDef component of your stationery. The value in the
superSymbol
slot is used to link a dataDef to an application.
If you do not know the value of the
superSymbol
slot for an application that is
installed on your Newton device, you may use the global function
GetDefs
to see
all the dataDefs that are registered by the system.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна