Important: The information in this document is obsolete and should not be used for new development.
SRAddText
You can use theSRAddTextfunction to add text to the contents of a language object.
pascal OSErr SRAddText ( SRLanguageObject base, const void *text, Size textLength, long refCon);
base- A language object.
text- The address of a buffer that contains the words or phrase to add to the contents of the specified language object.
textLength- The size, in bytes, of the specified text.
refCon- An application-defined reference constant. The value of the reference constant property of the new word or phrase representing the specified text is set to this value.
DESCRIPTION
TheSRAddTextfunction adds objects representing the text specified by thetextandtextLengthparameters to the contents of the language object specified by thebaseparameter. In addition, the value of the reference constant property of the added objects is set to the value specified by therefConparameter.The
SRAddTextfunction is useful for phrases, paths, and language models. If thebaseparameter specifies a path or language model,SRAddTextis equivalent to callingSRNewPhrase,SRAddLanguageObject, andSRReleaseObjectfor the phrase specified by thetextparameter and callingSRSetPropertyto reset the value of the reference constant property of the new phrase.If the
baseparameter specifies a phrase,SRAddTextis equivalent to callingSRNewPhrase,SRAddLanguageObject, andSRReleaseObjectfor each distinguishable word in thetextparameter and callingSRSetPropertyto set the value of the reference constant property of the new words.