background image
C H A P T E R 4
NewtApp Applications
4-18
Using NewtApp
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 the
forceNewEntry
slot. Leave it with the default value
true
.
This causes a new entry to be created if a user tries to open an empty folder.
5. Add a
viewFormat
slot and set the
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.
6. Set the name slot to a string like
"Overview"
.
7. Add a
centerTarget
slot and set it to
true
. This assures that the entries are
centered for display in the Overview.
Controlling Menu Buttons From Layouts
4
Once the name of the status bar is declared to the application base view (in the
newtApplication.statusBarSlot
), you may control the appearance and
disappearance of buttons on the status bar, from the layout view, as needed.
To do this, you must specify which buttons should appear on the status bar by
using the slots
menuLeftButtons
and
menuRightButtons
. Each of these is
an array that must contain the name of the button proto(s) that you wish to appear
on the menu bar's left and right sides. When you use these arrays, the button protos
listed in them are automatically placed correctly on the status bar, according to the
current human interface guidelines.
To appropriately set up the appearance of the status bar for display in the Overview,
first add the optional slots
menuLeftButtons
and
menuRightButtons
. The
buttons you name in these slots replace the menu bar buttons from the main layout,
since the
statusBarSlot
is set there.
Set the
menuLeftButtons
slot to an array that includes the protos for the
Information and New buttons. These buttons are automatically laid out on the
status bar, going from left to right.
menuLeftButtons:=[
newtInfoButton,
newtNewStationeryButton,
]
Set the
menuRightButtons
slot to an array that includes the protos for the
Action and Filing buttons. These buttons are automatically laid out on the status
bar from right to left.
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна