Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

AutoCorrectionMap does not work for all characters - RapidSpell WPF - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
TMulder
#1 Posted : Wednesday, January 19, 2011 7:41:07 PM
Rank: Member

Groups: Registered

Joined: 1/4/2011
Posts: 42
AutoCorrectionMap.Add("=tc", "Telephone conference") won't work. Probably because somewhere the = is filtered or special.

Is there something we can do to have this work or can we use another special character?
Jim
#2 Posted : Wednesday, January 19, 2011 8:03:28 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
= is a breaking char (not part of words), so to change that you can do this

Code:

            rapidSpellAsYouType1.RapidSpellChecker.TextBoundary = new CustomTextBoundary();
            rapidSpellAsYouType1.TextBoundary = new CustomTextBoundary();//must use sep. instance to above


and add this class

Code:

    class CustomTextBoundary : Keyoti.RapidSpell.Wpf.FrameWorkSpecific.AdvancedTextBoundary
    {
        protected override bool isAtNonWhiteSpace(int position)
        {
            return theText[position]=='=' || base.isAtNonWhiteSpace(position);
        }
    }


Now, the only thing is that the spell checker also ignores words that don't start with a letter or digit, so unless you want to add a bit more overloading, you'd need to use this instead of what you have;

AutoCorrectionMap.Add("tc=", "Telephone conference")

Is that OK?
Jim

-your feedback is helpful to other users, thank you!

Evaluation Downloads - http://keyoti.com/products
-your feedback is helpful to other users, thank you!


TMulder
#3 Posted : Wednesday, January 19, 2011 9:32:00 PM
Rank: Member

Groups: Registered

Joined: 1/4/2011
Posts: 42
Hey thanks. But could you provide the other overloads. It is a bit wierd to do tc=
TMulder
#4 Posted : Thursday, January 20, 2011 1:50:11 PM
Rank: Member

Groups: Registered

Joined: 1/4/2011
Posts: 42
I spoke with the product manager and she is ok with tc= for now. So, I have no need to have the overloads currently. Thx
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.