Important: The information in this document is obsolete and should not be used for new development.
SRChangeLanguageObject
You can use theSRChangeLanguageObject
function to change the contents of a language object.
pascal OSErr SRChangeLanguageObject ( SRLanguageObject languageObject, const void *text, Size textLength);
languageObject
- A language object.
text
- The address of a buffer that contains the words or phrase to which the contents of the specified language object are to be changed.
textLength
- The size, in bytes, of the specified text.
DESCRIPTION
TheSRChangeLanguageObject
function changes the contents of the language object specified by thelanguageObject
parameter to the data specified by thetext
andtextLength
parameters.SRChangeLanguageObject
is a convenient shortcut for callingSREmptyLanguageObject
and thenSRAddText
.
SRChangeLanguageObject
does not alter the value of the reference constant property of the language object specified by thelmObject
parameter.If there are no other references to the language object specified by the
languageObject
parameter, callingSRChangeLanguageObject
causes that object to be released.SPECIAL CONSIDERATIONS
If you want to swap rapidly among several language models, you should use theSRSetLanguageObject
function instead ofSRChangeLanguageObject
. Or, you could use thekSREnabled
property to rapidly enable and disable parts of the current language model to reflect the current context.