Apple Newton Utilities Guide de l'utilisateur Page 350

  • 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 349
CHAPTER 9
Recognition
9-8 About the Recognition System
clParagraphView view child. Ink text automatically wraps to the paragraph
boundaries, just as recognized text does. Ink text is also usually reduced in size
when it is drawn, according to the user preference specied by the Ink Text Scaling
item in the Text Editing preferences slip. Sketch ink, on the other hand, is treated as
a graphic: it is inserted into the view as a
clPolygonView view child. Sketch ink
is always drawn at full size, and in the position at which it was written on the screen.
Thus, stroke bundles are normally returned only to views that do not perform
recognition. To cause the system to always return stroke bundles to the view (in
addition to any word units, gesture units or shape units that may be passed to the
view), set the view’s
vStrokesAllowed ag and provide a ViewStrokeScript
method, as described in “Customized Processing of Input Strokes” beginning on
page 10-40.
The recognition system’s classication of user input is essentially a process of
elimination. Enabling and conguring only the recognizers and dictionaries
appropriate to a particular context is the primary means by which you optimize the
recognition system’s performance within your application.
Enabling Recognizers 9
Each view has a viewFlags slot that contains a bit field. The bits in this field
specify characteristics that the view does not inherit from its view class, such as its
recognition behavior. When you set a view ag, it sets bits in this eld to enable
combinations of recognizers and dictionaries suited to the input you anticipate the
view to receive.
Not all of the bits in this eld affect recognition; some are used to set other
characteristics, such as the view’s placement on the screen. The bits in this eld
that affect the recognition system are referred to as the view’s input mask. When
the view is constructed at run time, the system copies the input mask bits and other
view ags’ bits into the view’s
viewFlags slot. shows the relationship of
recognition-related view ags to bits in the
viewFlags slot.
You can set bits in the
viewFlags slot from within the graphical view editor in
Newton Toolkit or you can set them programmatically from within your own
NewtonScript code. Either approach allows you to set combinations of bits to
produce a variety of behaviors.
This book uses the NewtonScript approach for all examples. For information on
using the graphical view editor in Newton Toolkit, see Newton Toolkit Users Guide.
Vue de la page 349
1 2 ... 345 346 347 348 349 350 351 352 353 354 355 ... 941 942

Commentaires sur ces manuels

Pas de commentaire