Apple Newton Utilities Guide de l'utilisateur Page 417

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 416
CHAPTER 10
Recognition: Advanced Topics
Using Advanced Topics in Recognition 10-41
Customized Processing of Double Taps 10
To process double taps reliably, your view’s ViewGestureScript method can
test for the presence of the
aeDoubleTap gesture. The gesture recognizer
measures time between pen events reliably even when the main NewtonScript
thread is busy.
The recognition system considers a second tap to be part of a double tap when it
occurs within a specied amount of time and distance relative to the rst tap.
The second tap must be within 6 pixels of the rst to be considered part of a double
tap. Any stroke longer than 6 pixels is not recognized as a tap (or as the second
tap). Measurement of the distance between taps is based on the midpoint of the
start and end points of the stroke.
The amount of time that determines whether a second tap is considered part of a
double tap is specied by the value of the
timeoutCursiveOption slot in the
system’s user conguration data. This value ranges between 15 and 60 ticks, with a
default value of 45 ticks. The user sets the value of this slot by moving the
“Transform my handwriting” slider in the Fine Tuning slip. The Fine Tuning slip is
available from the picker displayed by the Options button in the Handwriting
Recognition preferences slip.
Your
ViewGestureScript method is called only if the view does not handle the
gesture automatically. Your
ViewGestureScript method should return the
value
true to avoid passing the gesture unit to other ViewGestureScript
methods, such as those supplied by views in the
_parent chain. If you do want to
pass the gesture unit to other views, your method should return the value
nil.
Changing User Preferences for Recognition 10
When you must make system-wide changes in recognition behavior, you can set
the values of slots in the system’s user conguration data to do so. However, in
most cases it is more appropriate to change the behavior of individual views, rather
than system-wide settings. For information on using
recConfig frames to specify
the recognition behavior of individual views, see “Using recCong Frames”
beginning on page 10-8.
Take the following steps to change recognition settings used by all views:
1. Call the
SetUserConfig function to set the values of one or more slots in the
system’s user conguration data. For a complete listing of the recognition-
related slots, see “System-Wide Settings” (page 8-2) in Newton Programmer’s
Reference.
2. Call the
ReadCursiveOptions function to cause the system to use the
new settings.
Vue de la page 416
1 2 ... 412 413 414 415 416 417 418 419 420 421 422 ... 941 942

Commentaires sur ces manuels

Pas de commentaire