C H A P T E R 5
The following example uses the constant
as the value of the
slot. It is defined as follows in the
constant kSuperSymbol := 'notes;// Note's SuperSymbol
Once you have created an NTK layout, named the template
saved the file under the name
, you may set the slots of the
. This shows up in the New button's picker.
to the constant
. This stationery can
only be used by an application that has a matching value in the
"An IOU entry"
. This string shows up in the
information box that appears when the user taps the icon on the left side of
the header, as shown in Figure 4-5 (page 4-9).
. This is an arbitrary stationery version number set at your
slot; it's not needed since this object is not a view.
There are a number of methods defined within the
you should override for your data type.
Defining DataDef Methods
The three methods
illustrated in this section. You use the method
to define the soup
entries for your dataDef; the method
is required by NewtApp
overview scripts to return text for display in the overview; and
called by the routing interface to return a text description of your data.
method returns a complete entry frame which will be added
to some (possibly unknown) application soup. You should use
instead of the
method (which works in conjunction with the
), when your stationery
is being defined as an auto part.
The example of
used here defines the constant
as a frame in which to define all the generic parts of the entry.
All the specific parts of the data definition are kept in a nested frame that has the
name of the data class symbol,
. By keeping the specific definitions
of your data grouped in a single nested frame and accessible by the class of the
data, you are assuring that your code will be reusable in other applications.