Posted 19 years ago
by Ashton
-
Developer,
Schema Solutions LLC
I am trying to use the AutoCorrect feature to force a certain list of keywords to be upper cased as defined in the language.
However, when I turn on AutoCorrect while updating the language programmatically, it doesn't seem to autocorrect my items.
I turn on AutoCaseCorrectEnabled (TRUE) but it still seems to not correct the case.
Here is a sample of the code I'm trying:
doc.Language.IsUpdating = true;
LexicalState state = doc.Language.LexicalStates["DefaultState"];
foreach (LexicalPatternGroup group in state.LexicalPatternGroups)
{
if (group.TokenKey = "SomeKey")
{
group.CaseSensitivity = CaseSensitivty.AutoCorrect;
doc.AutoCaseCorrectEnabled = true;
}
}
doc.Language.IsUpdating = false;
Is there anything else needed to use auto case correct or is there something else I can check to see what might be happening?
Thanks,
Ashton
However, when I turn on AutoCorrect while updating the language programmatically, it doesn't seem to autocorrect my items.
I turn on AutoCaseCorrectEnabled (TRUE) but it still seems to not correct the case.
Here is a sample of the code I'm trying:
doc.Language.IsUpdating = true;
LexicalState state = doc.Language.LexicalStates["DefaultState"];
foreach (LexicalPatternGroup group in state.LexicalPatternGroups)
{
if (group.TokenKey = "SomeKey")
{
group.CaseSensitivity = CaseSensitivty.AutoCorrect;
doc.AutoCaseCorrectEnabled = true;
}
}
doc.Language.IsUpdating = false;
Is there anything else needed to use auto case correct or is there something else I can check to see what might be happening?
Thanks,
Ashton