Hi all,
I’m trying to use the spellcheck plugin to spellcheck entire form and I can’t seem to do it.
I have a form with about 10 fields, and i gave them all names…so i tried:
plugins.spellcheck.checkTextComponent(elements.a_problem);
plugins.spellcheck.checkTextComponent(elements.a_problem_discover);
…etc.
However, it won’t find my misspellings. If i only do 1 field at a time, spellcheck does work and stops at the misspelled word.
Please help!
thanks,
Using: Servoy version 3.1.3-build 407, repository version 29
The problem that comes up when trying to spellcheck multiple fields is that you have to make the method elements.spellcheck.checkTextComponent( )
pause until the user decides to change the word or ignore it. when you make consecutive calls to the spellcheck method it doesnt wait for the user to give input so it only looks like it only checks one field. The best way I came up with to do this is by making the application sleep long enough for the user to look at the word and decide whether he wants to change it or ignore it.
Heres the code
for ( var i = 0 ; i < forms.form_name.elements.length ; i++ )
{
plugins.spellcheck.checkTextComponent( forms.form_name.elements[ i ] )
application.sleep( sleep_time )
}
its not the best way to solve your problem, but until there is a way to make the method pause until the users gives input it might be the best way.
thanks for the tip.
I guess not many people out there use the spell checker plug-in. There’s gotta be a better way or some workaround.
Nope - Matt’s code is the best way.
You could create a method that would take the form name as an argument so you only have to do the code once.