C H A P T E R 9
Recognition
About the Recognition System
9-9
Figure 9-2
Recognition-related view flags
View Flags
9
The system supplies a number of constants, called view flags, which are used to set
bits in a view's
viewFlags
slot programmatically. In general, each of these flags
activates a combination of recognizers and dictionaries suited to recognizing a
particular kind of input. Thus, a view's view flags specify the kinds of data it is
likely to recognize successfully. For a summary of the view flags that affect
recognition, see "Constants" (page 9-31).
There are two ways to set view flags from NewtonScript: you can place view flag
constants in your view template's
viewFlags
slot or you can supply a recognition
configuration (
recConfig
) frame for the view. Occasionally, the use of both
techniques is appropriate, but in most cases you'll use only one or the other.
Recognition Configuration Frames
9
Recognition configuration frames (
recConfig
frames) provide an alternate
programmatic interface to the recognition system. They can be used to provide any
behavior that view flags provide, and can also be used to provide specialized
recognition behaviors that view flags cannot. For example, view flags generally set
vTimeField
vDateField
vPhoneField
Reserved for system use
vShapesAllowed
5
0
10
15
20
24
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
vAnythingAllowed
vSingleUnit
vCustomDictionaries
vCharsAllowed
vNumbersAllowed
vLettersAllowed
vPunctuationAllowed
vClickable
vStrokesAllowed
vGesturesAllowed
vAddressField
vNameField
vCapsRequired
vNothingAllowed