background image
C H A P T E R 4
NewtApp Applications
Using NewtApp
4-19
menuRightButtons:=[
newtActionButton,
newtFilingButton,
]
Be sure to add the Overview Layout template file to your NTK Project window.
Creating the Default Layout
4
This is the view you see upon opening the application. Since it will eventually
contain views that display the data, it needs to know about the application soup.
The
masterSoupSlot
identifies the application soup to the layout proto. The
symbol in this slot must match the name of a soup declared in the
allSoups
slot
of the
newtApplication
base view, which was
IOUSoup
. In the layout it is
used as a symbol to set the value of the
masterSoupSlot
.
Follow these steps to create the required default layout:
1. Open a new layout window in NTK and drag out a
newtLayout
proto.
2. Name it
default
.
3. Set the
masterSoupSlot
to the symbol
'IOUSoup
. This correlates to the
name of the soup as it is set up in the
newtApplication.allSoups
slot.
See "Setting Up the Application Soup," beginning on page 4-15.
4. Add a
forceNewEntry
slot
.
Leave the default value
true
. This causes a new
entry to be created when a user tries to open an empty folder.
5. Set the
viewFormat
slot's Fill value to White. This makes the data it displays
look better and keeps anything from inadvertently showing through. In addition,
the white fill improves the speed of the display and enhances view performance.
Be sure to add the default template file to your NTK Project window.
Using Entry Views
4
Entry views are used as containers for the slot views that display data from the
slots in the target entry of the application soup. They are also the containers for the
different header bars. Note that entry views are not necessary in the overview
layout, since the overview layout displays items as shapes.
The entry view sets values needed to locate the data to be displayed in the slot
views it will contain. These values include references to the data cursor (the
dataCursor
slot), the soup entry that contains the stored data (the
target
slot),
and the view to display data (the
targetView
slot).
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна