background image
C H A P T E R 9
Recognition
9-30
Using the Recognition System
or typing them. To prevent invalid input by these means, you can implement a
ViewChangedScript
method that validates its view's input.
Using the vAnythingAllowed Mask
9
The
vAnythingAllowed
mask can be used only with views based on the
clEditView
class. When used by itself, this mask sets all of the bits in the view's
input mask, potentially enabling all of the system-supplied recognizers and
dictionaries. However, the actual recognition behavior of views that use this mask
varies according to current user preference settings.
For a view that sets the
vAnythingAllowed
mask, the recognition system
replaces the set of view flags you've specified with a set of flags derived from the
current settings of user preferences that affect recognition.The actual set of
recognizers enabled for the view is controlled by
user preferences specified in the system's user configuration data.
the application's
protoRecToggle
view, if it has one.
the view's
recConfig
frame, if it has one.
Slots in the system's user configuration data specify recognition behaviors that all
views inherit. However, an optional
protoRecToggle
view can specify different
behaviors for individual views by overriding values inherited from user configuration
data. Similarly, each view can provide a
recConfig
frame that overrides settings
specified by the
protoRecToggle
view or the system's user configuration data.
Thus, in practice, the
vAnythingAllowed
mask usually is not what its name
implies: if any bit in this mask is turned off (by another flag, or by a
recToggle
view, for example), the input mask is no longer
vAnythingAllowed
.
The built-in Notepad application provides a good example of the behavior of views
that use the
vAnythingAllowed
mask, including the use of a
protoRecToggle
view to change recognition settings.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна