[Gambas-user] Textedit and Spell checking
Rob
sourceforge-raindog2 at ...94...
Sat Mar 29 00:36:04 CET 2008
On Friday 28 March 2008 19:05, MaxVK wrote:
> Firstly I am trying to pop open a modal window that will show a
> list of the suggested words, and give options to replace etc.
> However, I cant seem to work out where to put the code for this,
> because if I show the modal window during the aspell_read routine
> everything else is finished by the time I return to it. This means
> I only get a chance to change one error word.
Yeah, that's the bummer with asynchronous processing. You could
always write a temporary file with the text you want to check, then
shell "aspell pipe <thatfile >anotherfile" and read anotherfile
synchronously to display your modal dialog a bunch of times.
> Secondly, the program never quits properly, so something is hanging
> on when I exit, and I'm not sure what. Presumably I need to close
> the link with aspell when the spelling routine has finished, but
> I'm unsure how to do this.
That's true, aspell will just sit there until you send it an
end-of-file. I don't know how to send an EOF to a process without
closing it (which I assume closes it for input, not just output.)
The temporary file approach would solve this too, awkward though it
is.
Rob
More information about the User
mailing list