C H A P T E R 4
Optional. Set the
to contain the declared name of the status
bar so layouts can use it to control the buttons displayed on it. Use the symbol
to set it.
If you wish to override a system message like
, which is
called before a view is displayed on the screen, make sure to call the inherited
method at the end of your own
method. Also, you may
wish to add a
method to the
view so your application can rotate to a landscape display. This message is sent to
each child of the root view when the screen orientation is changed. See
(page 2-73) in Newton Programmer's Reference for details.
Finally, be sure to add the layout file
to your project and mark it as
the application base view.
Tying Layouts Into the Main Application
slot in the
proto is a frame that contains
symbols for the application's layout files. It must contain two slots, named
that refer to the two layout files used for those
The section "Using the Layout Protos," beginning on page 4-16, shows how to use
the NewtApp layout protos to construct these files. Assume they are named Default
Layout and Overview Layout for the purpose of setting the references to them in
slot. The following code segment sets the
default: GetLayout("Default Layout"),
overview: GetLayout("Overview Layout"),
Setting Up the Application Soup
proto uses the values in its
slot to set up and
register your soup with the system.
The framework also looks in the
slot to get the appropriate
soup information for each layout. It does this by matching the value of
to the name of a frame contained in the
slot. See the section "Using the Layout Protos,"
following this one.
This application contains only one soup, though a NewtApp application can
contain more than one. Each soup defined for a NewtApp application must be
based on the
proto. The slots
must be defined within the
soup definition frame.