Posted 14 years ago by Ashton - Developer, Schema Solutions LLC
Avatar
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

Comments (1)

Posted 14 years ago by Ashton - Developer, Schema Solutions LLC
Avatar
Nevermind.

I found that I was working on 2 different documents. It now works properly.

Thanks,

Ashton
The latest build of this product (v2018.1 build 0341) was released 7 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.