[Gambas-user] Textedit and Spell checking

Rob sourceforge-raindog2 at ...94...
Sat Mar 29 14:10:08 CET 2008


On Saturday 29 March 2008 08:30, MaxVK wrote:
> I don't seem to be able to relate the actual position of the
> misspelled words in the editor, to the positions reported by
> aspell; I know HOW they are being worked out, but I cant seem to
> replicate it in my editor so that I can change the words. This is
> currently the only thing left (so far) thats preventing this method
> from being a great spell checking option.

If you were using a regular textarea, I'd suggest replacing all the 
linefeeds with spaces in a temporary variable, using 
Replace(textarea1.text, "\n", " "), before shelling out to aspell.  
Then the offsets would be preserved, but aspell should see it as one 
long paragraph.  Aspell handles input on a line by line basis and I 
can't find a flag to change that.

I don't know whether that would work in a textedit, but I did notice 
that the textedit includes br tags inline with no linefeed, while 
inserting a linefeed after each paragraph.  So I don't think it's br 
vs. p, but linefeed vs. no linefeed.

Rob




More information about the User mailing list