Sign In
Sign Up
Products
Purchase
Downloads
Demos
Forums
Blogs
Documentation
Corporate
Aspose.com
»
Public Forums for Customers an...
»
Aspose.Spell
»
Re: GetNextWrongWord() - not working..
GetNextWrongWord() - not working..
Last post 04-11-2008, 6:50 PM by
mdelvecchio
. 4 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
04-11-2008, 4:41 PM
121917
mdelvecchio
Joined on 10-23-2007
Posts 16
GetNextWrongWord() - not working..
hello,
i have purchased & installed Spell for a VS.NET 2003 Windows Forms app. i have explored the demo and made some modifications to the FormSpell.vb, and it works great.
but, when i move my modified-form into my own project (which as the Aspose.Spell Reference and .lic file), the spell checker behaves strangely -- it fails to detect any misspelled words! GetNextWrongWord() never returns anything, when it should for test words such as "xxxTest".
- i am loading the US dictionary file off the file system.
- my own project resides on a different computer than the test project.
- copying the test project to my dev computer works -- the test project picks up misspelled words.
what could be the trouble?
thanks
matt
04-11-2008, 5:52 PM
121924
in reply to
121917
romank
Joined on 08-06-2003
Posts 5,932
Re: GetNextWrongWord() - not working..
: ill create that test class, see what happens.
: thanks
: yes, if you can get the error there, attach in the forum please.
Roman Korchagin
Lead Developer,
Aspose Auckland Team
04-11-2008, 6:15 PM
121925
in reply to
121917
mdelvecchio
Joined on 10-23-2007
Posts 16
Re: GetNextWrongWord() - not working..
will do.
in the mean while, here is my forms code:
SOME FORM: has rtbNarrative, and btnSpellCheck
---------------------------------------------------
Private spell As Spell = New Spell
Private Sub btnSpellCheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSpellCheck.Click
'Start spell checking.
Dim frmSpellChecker As SpellChecker = New SpellChecker(Me.rtbNarrative, Me.spell)
frmSpellChecker.ShowDialog(Me)
End Sub
SPELLCHECKER FORM:
----------------------------------------------------
Private sourceTextBox As RichTextBox
Private spell As Spell
Public Sub New(ByVal sourceTextBox As RichTextBox, ByVal spell As Spell)
MyBase.New()
InitializeComponent()
Me.sourceTextBox = sourceTextBox
Me.spell = spell
End Sub
Private Sub SpellChecker_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
LoadDictionaries()
'start checks
spell.CheckingText = sourceTextBox.Text 'includes the bad-word "xTest"
GetNextWord()
End Sub
Private Sub GetNextWord()
spell.GetNextWrongWord()
If spell.WrongWord.Length > 0 Then 'always empty???
txtBad.Text = spell.WrongWord
Cursor.Current = Cursors.WaitCursor
SetSuggestedWords(spell.GetCorrectWordList(spell.WrongWord))
sourceTextBox.Select(spell.StartPos, spell.WrongWord.Length)
Cursor.Current = Cursors.Default
Else
'No more wrong words. Spell checking is finished.
sourceTextBox.Text = spell.CheckingText
Me.Close()
MessageBox.Show(Me.Parent, "Spell check finished.", "Spell Check", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
04-11-2008, 6:34 PM
121926
in reply to
121925
mdelvecchio
Joined on 10-23-2007
Posts 16
Re: GetNextWrongWord() - not working..
...ok, to test i copied the FormMain from the demos project and copied it into my enterprise project. Works! (uses the SpellChecker.vb dialogue i made, and finds bad words).
that means there is something amiss w/ my enterprise project's parent form (which calls the SpellChecker.vb dialogue).
what could be missing? all you need are these, right:
Private spell As Spell = New Spell
Private Sub btnSpellCheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSpellCheck.Click
'Start spell checking.
Dim frmSpellChecker As SpellChecker = New SpellChecker(Me.rtbNarrative, Me.spell)
frmSpellChecker.ShowDialog(Me)
End Sub
...that is, a richtextbox to check, a Spell to check it with, and passing these into the SpellChecker diaglogue.
right?
04-11-2008, 6:50 PM
121927
in reply to
121926
mdelvecchio
Joined on 10-23-2007
Posts 16
Re: GetNextWrongWord() - not working..
found it!
my faulty-form's RichTextBox is in ALL CAPS! the default Spell options ignore this!
changed the Spell option properties. FIXED!!
matt
Contact Us
.
Privacy Policy
.
Terms of Use
.
Site Feedback
© Aspose 2002-2008. All Rights Reserved.
Language:
Arabic (العربية)
Chinese Simplified (中文(简体)
Chinese Traditional (中文(繁體)
Dutch (Nederlands)
English
French (français)
German (Deutsch)
Italian (italiano)
Japanese (日本語)
Korean (한국어)
Portuguese (Português)
Russian (русский)
Spanish (español)