background image
C H A P T E R 4
NewtApp Applications
4-24
Using NewtApp
omitted if your base application view's soup slot is set to the default name
dataSoup
.
Add a
soupQuerySlot
and set it to the symbol
'cardSoupQuerySpec
.
This symbol should match a slot defined in your application base view. The slot
may be omitted if your base application view's soup query slot is set to the
default name
soupQuery
.
Finally, you should make sure to declare the
newtFalseEntryView
to the
application base view so the base view can send
Retarget
messages to the false
entry view when data is changed.
For more information about the
newtFalseEntryView
see the Newton
Programmer's Reference
.
Creating a Custom Labelled Input-Line Slot View
4
You may find situations in which you need to create a custom slot view to get one
that does exactly what your application requires. For example, the NewtApp
framework does not yet contain a slot view that can display a picture. This is
possible after you know more about how the slot views work.
In general, a slot view performs the following functions:
Target data; that is, updates a soup entry from its contents and vice versa.
Format data by using a filter.
Allow you to place ("jam") the data from another soup entry in this slot view. Of
the built-in slot views, the
newtSmartName
proto does this.
All slot views assume a soup entry has been set by the parent view as the value of
the
target
slot. The
target
slot contains a reference to the soup entry. The soup
entry contains the slot with the data to be displayed in a given slot view and stores
the new data.
Slot views also require a
path
slot which refers to the specific slot within the
target
entry. The path expression must lead to a slot that holds the correct
kind of data for a given slot view. For instance, the
path
slot of a
newtROTextDateView
proto must refer to a slot in an entry that contain a
integer date.
In the label input-line slot view protos, formatting is accomplished by selecting the
correct NewtApp data filter as the value of the slot view's
flavor
slot. Note that
some of the NewtApp data filters also specify a particular system picker which will
be available when you use the
popup
option for your slot view. See the DTS
sample code to see how to create a new newt proto.
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна