Apple Newton Utilities Uživatelská příručka Strana 153

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 942
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 152
CHAPTER 4
NewtApp Applications
Using NewtApp 4-15
Optional. Set the statusBarSlot to contain the declared name of the status
bar so layouts can use it to control the buttons displayed on it. Use the symbol
'status to set it.
If you wish to override a system message like
ViewSetupFormScript, which is
called before a view is displayed on the screen, make sure to call the inherited
method at the end of your own
ViewSetupFormScript method. Also, you may
wish to add a
ReOrientToScreen method to the newtApplication base
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
ReOrientToScreen (page 2-73) in Newton Programmers Reference for details.
Finally, be sure to add the layout le
baseView.t to your project and mark it as
the application base view.
Tying Layouts Into the Main Application 4
The allLayouts slot in the newtApplication proto is a frame that contains
symbols for the application’s layout les. It must contain two slots, named
default and overview, that refer to the two layout files used for those
respective views.
The section “Using the Layout Protos,” beginning on page 4-16, shows how to use
the NewtApp layout protos to construct these les. Assume they are named Default
Layout and Overview Layout for the purpose of setting the references to them in
the
allLayouts slot. The following code segment sets the allLayouts slot
appropriately:
allLayouts:= {
default: GetLayout("Default Layout"),
overview: GetLayout("Overview Layout"),
}
Setting Up the Application Soup 4
The newtApplication proto uses the values in its allSoups slot to set up and
register your soup with the system.
The framework also looks in the
allSoups slot to get the appropriate
soup information for each layout. It does this by matching the value of
the layout’s
masterSoupSlot to the name of a frame contained in the
newtApplication.allSoups 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 dened for a NewtApp application must be
based on the
newtSoup proto. The slots soupName, soupIndices, and
soupQuery must be defined within the allSoups soup definition frame.
Zobrazit stránku 152
1 2 ... 148 149 150 151 152 153 154 155 156 157 158 ... 941 942

Komentáře k této Příručce

Žádné komentáře