Apple Newton Utilities Betriebsanweisung Seite 366

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 942
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 365
CHAPTER 9
Recognition
9-24 Using the Recognition System
this regard. If necessary, you can provide a ViewWordScript or
ViewChangedScript method that validates the recognizer’s output; this method
can be especially useful when working with the printed recognizer.
Accepting Pen Input 9
When setting up any view, you must specify whether it accepts pen input at all. If
you set the
vNothingAllowed ag (or turn off all recognition-oriented ags), the
view does not accept pen input. If you want the view to accept pen input, you must
set the
vClickable ag in its viewFlags slot. Setting this ag only causes the
view to accept pen taps and send
ViewClickScript messages; it does not
enable ink handling or send messages to any of the unit-handling methods that
provide recognition behavior.
Setting the
vClickable ag species that the view system is to send the
ViewClickScript message to the view once for each pen tap that occurs within
the view. Note that this is the case only when
vClickable is the only ag set for
the view—other ags, such as the
vCustomDictionaries ag, set the
vClickable bit in the view’s input mask also.
When this ag is set, the system sends additional messages to the view to signal
taps, strokes, gestures, and words. All pen input is signaled by the
ViewClickScript message, which indicates that the pen contacted the screen
or was lifted from it within the boundaries of the view. If you supply a
ViewClickScript method, it should return true to indicate that the message
was handled, or
nil to pass the message on to another view. If this message is not
handled by the view and additional recognition ags are set, other messages may
be sent to the view, depending on what was written. These other messages include
ViewStrokeScript, ViewGestureScript, and ViewWordScript—in that
order, if all are sent.
Each of the corresponding input-related view methods accept as an argument a unit
object passed to it by the system. The unit contains information about the pen
input. You cannot examine the unit directly from NewtonScript, but you can pass it
to other system-supplied functions that extract information from it such as the
beginning and ending points of the stroke, an array of stroke points, the stroke
bounds, and so on.
Taps and Overlapping Views 9
When views overlap, taps can “fall through” from the top view to the one beneath,
causing unexpected results. For example, when the user taps in an area of the top
view that doesn’t handle taps, and the view beneath provides a button in the
vicinity of the tap, the button may be activated unintentionally.
Seitenansicht 365
1 2 ... 361 362 363 364 365 366 367 368 369 370 371 ... 941 942

Kommentare zu diesen Handbüchern

Keine Kommentare