beautypg.com

Apple Newton Programmer’s Newton 2.0 (for Newton 2.0) User Manual

Page 388

background image

C H A P T E R 1 0

Recognition: Advanced Topics

10-12

Using Advanced Topics in Recognition

As an alternative to using a

recConfig

frame to provide support for ink text, you

can set your

clParagraphView

view’s

vAnythingAllowed

mask. Although

this is truly the easiest way to support ink text, it is less-preferred because it
provides you the least control over the view’s recognition behavior. A variation on
this approach that may provide better performance is to enable an appropriate set
of view flags rather than setting the

vAnythingAllowed

mask. The best way to

support ink text, however, is through the use of a

recConfig

frame that provides

appropriate values.

Regardless of the approach you take to provide ink text support, you should test
your view’s recognition behavior under both text recognizers, and under any other
configurations your

recToggle

view provides.

To support both ink text and sketch ink in a single view, or to take other application-
specific action in response to changes in the state of a

recToggle

view, your view

can provide a

RecogSettingsChanged

method that reconfigures the its

recognition behavior dynamically. For more information, see “Changing
Recognition Behavior Dynamically” beginning on page 10-17.

For more information on

protoRecToggle

views, see “Using protoRecToggle

Views” beginning on page 10-19. For detailed descriptions of

recConfig

frames,

see “protoRecConfig” (page 8-36) and “System-Supplied recConfig Frames”
(page 8-18) in Newton Programmer’s Reference.

Fine-Tuning Text Recognition

10

To fine-tune either text recognizer’s interpretation of input strokes, you can add the
optional

speedCursiveOption

,

timeoutCursiveOption

, and

letterSpaceCursiveOption

slots to the

recConfig

frame. These

mechanisms for controlling recognizer behavior may affect various recognizers
differently. For more information, see “protoRecConfig” (page 8-36) in Newton
Programmer’s Reference
. For a discussion of the

dictionaries

slot, see “Using

Your RAM-Based Custom Dictionary” beginning on page 10-28.

Table 10-1

Recognition failure in paragraph or edit view controlled by

recToggle

Recognizer enabled
by

recToggle

view

Returns on failure

Text Ink

text

Ink text

Ink text (does not fail)

Shapes

Sketch ink, smoothed

Sketch ink

Nothing (occurs rarely)