Apple Newton Utilities Podręcznik Użytkownika Strona 368

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 942
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 367
CHAPTER 9
Recognition
9-26 Using the Recognition System
Double Taps” beginning on page 10-41. See also “ViewGestureScript” (page 8-71)
in Newton Programmers Reference.
Combining View Flags 9
Generally, you must combine multiple view flags to produce useful recognition
behavior. For example, most views that accept user input set the
vClickable ag
to enable pen input and the
vGesturesAllowed ag to enable recognition of
standard gestures such scrubbing and inserting spaces.
Except where noted otherwise, the NewtonScript “plus” operator (+) is used to
combine view ags, as in the following code fragment.
myViewTemplate :=
{
// recognize taps, gestures, and shapes
viewFlags: vClickable+vGesturesAllowed+vShapesAllowed,
…}
Note
Most combinations of view ags include the vClickable ag.
If you do not set the
vClickable ag, the view does not accept
pen input at all.
Sometimes a particular combination of view ags produces results that seem
incorrect. For example, you might be surprised to discover that a view setting only
the ags
vClickable+vLettersAllowed can occasionally recognize numeric
values. (The
vLettersAllowed ag enables the recognition of single text
characters by the cursive recognizer.) This behavior is caused by the presence of
the symbols dictionary in the set of dictionaries available to the view. The symbols
dictionary includes alphabetic characters, numerals and some punctuation marks.
Most view ags enable this dictionary to support the correction of single letters or
numerals by overwriting. As a side effect, it becomes possible to recognize
extraneous characters or numerals in elds that ostensibly should not support such
input. This behavior is rarely a problem, however, because the recognition system
is designed to show a strong preference for “appropriate” interpretations of input as
dened by the view ags set for the view.
Although you might expect that the presence of the symbols dictionary would
allow a view setting only the ags
vClickable+vNumbersAllowed to return
alphabetic characters, this behavior is quite difcult to produce. Views that set the
vNumbersAllowed flag show a much stronger preference for single-digit
numbers than single alphabetic characters. However, letters that do not look similar
to numeric values—for example, the letter
W—may produce this particular form of
misrecognition.
Przeglądanie stron 367
1 2 ... 363 364 365 366 367 368 369 370 371 372 373 ... 941 942

Komentarze do niniejszej Instrukcji

Brak uwag