background image
C H A P T E R 9
Recognition
Using the Recognition System
9-29
The
vNoSpaces
flag must appear in an evaluate slot named
textFlags
that you
create in the view. The
vSingleUnit
flag appears in the view's
viewFlags
slot,
as usual.
Forcing Capitalization
9
The
vCapsRequired
flag directs the system to capitalize the first letter of each
word returned by the recognizer before displaying the text in the view.
Setting the
vCapsRequired
flag does not affect the recognizer's behavior--it
affects post-processing performed on the recognizer's output before it is returned to
the view.
Justifying to Width of Parent View
9
Setting the
vWidthIsParentWidth
flag for a view based on the
clParagraphView
class causes the view to extend its right boundary to match
that of its parent automatically.
The
vWidthIsParentWidth
flag must appear in an evaluate slot named
textFlags
that you create in the view.
Like other flags set in the
textFlags
slot, the
vWidthIsParentWidth
flag
does not affect the recognizer's behavior--it affects post-processing performed on
the recognizer's output before it is returned to the view.
Restricting Input to Single Lines or Single Words
9
Including the
oneLineOnly
flag in your view's
viewJustify
slot causes the
view to accept only a single line of text input, with no word wrapping provided.
You can restrict input to a single word by including the
oneWordOnly
flag in the
view's
viewJustify
slot. If this flag is set, the view replaces the currently
displayed word with the new one when the user writes in the view. You can also
restrict input to single characters by using this flag in conjunction with a custom
dictionary of single letters.
For more information on these flags, see their descriptions in Chapter 3, "Views."
For information on the use of custom dictionaries, see "Using Custom
Dictionaries" beginning on page 10-24.
Validating Clipboard and Keyboard Input
9
It is possible for the user to enter invalid values in fields by dragging text from the
Clipboard or by using a keyboard to type in the field. For example, setting the
vPhoneField
flag normally restricts input to numeric values in phone number
formats; however, the user can still enter invalid values in such a field by dragging
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна