Hi Luzius
Schneider,
Excellent LS Spellchecker component! I
encountered a couple of minor problems, and these are the changes I made to
fix:
Version 3.0.5
Problem: OnMisspelling event never
fires.
Proposed solution: Added a line to
TSpellChecker.ContinueCheck; procedure.
if FSRC<>srNoErrors
then
begin
if
Assigned(FOnMisspell)
then
FOnMisspell(Self,FSRC,StartPos,EndPos-StartPos);
Inc(FMisspellStart, StartPos);
if
FSRC=srExtraSpaces
then
Dec(FMisspellLen);
FMemo.SelStart:= FMisspellStart;
FMemo.SelLength:= FMisspellLen;
FBackMemo.SelStart:=
FMisspellStart;
FBackMemo.SelLength:=
FMisspellLen;
FMisspellText:=
FSpeller.MisspellText;
end
else...
Problem: Sometimes selecting an incompatible
dictionary can cause an Access Violation error in TCSAPI.Create; (e.g.
MSWord'95 English (Australian) dictionary always fails) - If this happens then
the spellchecker will continue to fail forever, even if a different dictionary
is selected. To recover the entire application must be
restarted.
Proposed Solution: Modify
TSpellChecker.Init; so that it can recover when FBackMemo is Assigned
but invalid. Force FBackMemo to nil.
if Assigned(FBackMemo) then
begin
try FBackMemo.Free; except;
end;
FBackMemo:=nil;
end;
Problem: If an event is assigned to
TSpellLanguageComboBox.OnSelect then it
fails to change the SpellChecker dictionary.
Proposed solution: I don't have a solution for this
at the moment.
Hope these suggestions are useful. I am
currently trying to get TSpellchecker to work with Tnt Unicode controls - but
without much success. TTntMemo.Lines uses Unicode
widestrings.
Thanks again for a great component.