On 12-Jun-2001 Edwin Leuven wrote:

> While we are at it. I am having some scarce free moments again in which I am 
> looking at the spellcheck code.

Good!

> What I was thinking was to have something like the following (watch out, a 
> flow of consciousness of a c++ beginner follows!):
[snip class definitions]

Well Edwin this probably won't work anyway. We have to use PREPROCESSOR
#ifdef/#else/#endif stuff to handle this. Why? Because if you don't want
pspell you shouldn't have it in the code otherwise it won't work. You
hopefully understand what I mean? No PSpell means: No libpspell to load!

> The SpellChecker code should do something like this
> 
> 1. Initialize spellchecker
> 2. Draw dialog
> 3. Check next word until we run out of words
> 4. Update dialog
> 5. Stop: listen to dialog
> 6. Dialog returns info
> 7. Continue: Act on info and go to 3.

Generally Yes!

> I have some uncertainties especially about points 4 and 5. This should be 
> done in a way that all frontends can be easily hooked on. How would you guys 
> do this? Have virtual UpdateDialog and ListenToDialog functions that are 
> implemented separately for each frontend?

Why using signals here? We are interactive (that means we stop other activities
while we are spellchecking, aren't we?). So we just call a function and get
the result from this function. With the result-set we update the Dialog and
do the rest. It seems to me that we don't need signals here, but maybe I'm
wrong.

         Jürgen

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen Vigna        E-Mail:  [EMAIL PROTECTED]
Italienallee 13/N       Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen           Web:     http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Any two philosophers can tell each other all they know in two hours.
                -- Oliver Wendell Holmes, Jr.

Reply via email to