background image
C H A P T E R 4
NewtApp Applications
4-14
Using NewtApp
One other global, unique to this application, is set. It is the constant
kAppTitle
,
set to the string
"Card Starter"
.
Using newtApplication
4
This proto serves as the template for the application base view. This section shows
you how to use it to set up the
application base view
application soup
status bar; for layout-level control of the appearance and disappearance of
its buttons.
layout slots
stationery slots
Setting Up the Application Base View
4
The application base view template,
newtApplication
, should contain the basic
application element protos. When you use NTK to create the layout for the
newtApplication
proto, you add to it a
newtStatusBar
proto (the status bar
at the bottom of the application) and a
newtClockShowBar
(the folder tab across
the top of the application).
Follow these steps to create the application base view:
1. Create a new layout and draw a
newtApplication
proto in it.
2. Place a
newtStatusBar
across the bottom of the layout.
3. Name the
newtStatusBar
proto
status.
4. Place a
newtClockShowBar
proto across the top of the layout.
5. Save the layout file as
baseView.t
.
6. Name the layout frame
baseView
.
There are more than a dozen slots that need to be set in a
newtApplication
proto. Several of the
newtApplication
slots can be set quickly. Set these slots
as follows:
Set the
title
slot to
kAppTitle
. Note that you must define this constant.
Set the
appSymbol
slot to
kAppSymbol
. This constant is automatically
defined by NTK.
Set the
appObject
slot to
["Item", "Items"]
.
Set the
appAll
slot to
"All Items"
. Note that you'll see this displayed on a
folder tab.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна