This question is locked. New answers and comments are not allowed.
danparker276
Top achievements
Rank 2
danparker276
asked on 02 Feb 2012, 08:28 PM
My code that used to work to fire an event when the spell checker is changed (like a word added to the dictionary), isn't working anymore.
this.rrtbDescription.SpellChecker.DataChanged += SpellChecker_DataChanged;
My method SpellChecker_DataChanged doesn't get called.
Is this a silverlight 5 thing? I'm using the silverlight 5 binaries 2011.3.1304.1050
Edit: it's ok on a sample program I made. I'm doing a lot of different stuff in my program, seems like I'm killing the functionality somehow, I'll look into it more.
this.rrtbDescription.SpellChecker.DataChanged += SpellChecker_DataChanged;
My method SpellChecker_DataChanged doesn't get called.
Is this a silverlight 5 thing? I'm using the silverlight 5 binaries 2011.3.1304.1050
Edit: it's ok on a sample program I made. I'm doing a lot of different stuff in my program, seems like I'm killing the functionality somehow, I'll look into it more.
9 Answers, 1 is accepted
0
danparker276
Top achievements
Rank 2
answered on 02 Feb 2012, 09:49 PM
Ok, this happens after I load a dictionary. The DataChanged event won't get fired if I use the (AddDictionary) like below.
EDIT: If it helps, I call the event because I want to add new words to the database instead of isolated storage. In the thread below, you say there is a better way to do this. what is the other way?
http://www.telerik.com/community/forums/silverlight/richtextbox/spell-checker-adding-words-to-database-instead-of-iso-for-custom.aspx
EDIT: If it helps, I call the event because I want to add new words to the database instead of isolated storage. In the thread below, you say there is a better way to do this. what is the other way?
http://www.telerik.com/community/forums/silverlight/richtextbox/spell-checker-adding-words-to-database-instead-of-iso-for-custom.aspx
RadDictionary rd =
new
RadDictionary();
try
{
string
filename =
"/RichText;component/en-US.tdf"
;
Stream tdfStream = Application.GetResourceStream(
new
Uri(filename, UriKind.Relative)).Stream;
rd.Load(tdfStream);
}
catch
{
}
((DocumentSpellChecker)
this
.rrtbDescription2.SpellChecker).AddDictionary(rd, CultureInfo.InvariantCulture);
// The line above kills the dataChanged event
this
.rrtbDescription2.SpellChecker.DataChanged +=
new
EventHandler(SpellChecker_DataChanged);
0
Accepted
Hello Dan,
We have updated your Telerik points in appreciation of your involvement. Do not hesitate to get back to us if you have any other problems.
Note: Once the release is out and you upgrade to 2012 Q1, you should remove the line above. Greetings,
Andrew
the Telerik team
Actually this is a bug. We will fix it in our upcoming release, which will be out in a few weeks.
The workaround would be to attach the event to the custom dictionary to which the words are added like this:
((DocumentSpellChecker)
this
.editor.SpellChecker).GetCustomDictionary().DataChanged +=
new
EventHandler(SpellChecker_DataChanged);
We have updated your Telerik points in appreciation of your involvement. Do not hesitate to get back to us if you have any other problems.
Note: Once the release is out and you upgrade to 2012 Q1, you should remove the line above. Greetings,
Andrew
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
danparker276
Top achievements
Rank 2
answered on 06 Feb 2012, 09:21 PM
Thanks it working now. One thing I noticed though is that when I add it to the dictionary the redline under the word just added doesn't go away unless I set my cursor on another textbox or input control.
EDIT: the redline seems to go away now, I've noticed some strange behavior with that which I can't repeat though.
EDIT: the redline seems to go away now, I've noticed some strange behavior with that which I can't repeat though.
0
Hello Dan,
Iva Toteva
the Telerik team
We would appreciate it if you manage to reproduce the issue and get back to us with repro steps whenever you get back to the issue.
Kind regards,Iva Toteva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
danparker276
Top achievements
Rank 2
answered on 17 Feb 2012, 11:44 PM
On one of my clients a few users were not getting the red underline but if you right click it will show that it's a misspelled word. This doesn't happen all the time though, and I couldn't really repeat this. I also don't see it on my local system.
I'm in the middle of switching to the Silverlight 5 Q1 2012. Maybe this will clear up after that.
I'm in the middle of switching to the Silverlight 5 Q1 2012. Maybe this will clear up after that.
0
danparker276
Top achievements
Rank 2
answered on 28 Feb 2012, 02:32 AM
I added a support ticket with an attachment because I was able to re-produce this now.
This happens when I have 2 child windows and switch between the 2.
To reproduce:
Have a button to open up a rad window with a rich textbox. click the open window button twice to open up 2 rad windows. then on each rad rich text box type 'time'. Now switch back to the other rad window that has time typed in it. Now type a space and type 'porgs' or any misspelled word. It will not be highlighted in red, but if you right click it will show you word suggestions.
This happens when I have 2 child windows and switch between the 2.
To reproduce:
Have a button to open up a rad window with a rich textbox. click the open window button twice to open up 2 rad windows. then on each rad rich text box type 'time'. Now switch back to the other rad window that has time typed in it. Now type a space and type 'porgs' or any misspelled word. It will not be highlighted in red, but if you right click it will show you word suggestions.
0
Hello Dan,
Iva Toteva
the Telerik team
Thank you for the follow up and the repro project attached to the support ticket.
We verified that there is a bug. Unfortunately, it cannot be worked around at this point. We will try to fix as soon as possible.
Iva Toteva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
danparker276
Top achievements
Rank 2
answered on 20 Mar 2012, 03:03 AM
I've noticed that switch between windows is ok now in the internal builds, but when I edit some text, sometimes I don't get the red underline. Is this issue still being worked on?
0
Hello Dan,
Iva Toteva
the Telerik team
We have logged the issue and will look into it.
Unfortunately, a fix will not be introduced in the upcoming service pack which is due in less than a week.
Iva Toteva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>