background image
C H A P T E R 3
Using Views
view of your application, you should set to
those slots that aren't needed when
the application is closed, since they are wasting space in the NewtonScript heap. It
is especially important to set to
slots that reference soups and cursors, if they
are not needed, since they use relatively much space.
If your application is gathering data from the user that needs to be stored, store the
data in a soup, rather than in slots in one of the application views. Data stored in
soups is protected, while slots in views are transient and will be lost during a
system restart.
For information on declaring views, see "View Instantiation" (page 3-26). For
information on storing data in soups, see Chapter 11, "Data Storage and Retrieval."
Scrolling the contents of a view can sometimes seem slow. Here are some techniques
you can use to improve the speed:
Scroll multiple lines at a time, rather than just a single line at a time, when the
user taps a scroll arrow.
In general, reduce the number of child views that need to be redrawn, if
possible. For example, make a list that is implemented as several paragraphs
(separate views) into a single paragraph.
Set the view fill to white. For more information, see "View Fill" (page 3-44).
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна