hunspell for richview

General TRichView support forum. Please post your questions here
Post Reply
sr1111
Posts: 27
Joined: Thu Jan 31, 2008 12:18 pm

hunspell for richview

Post by sr1111 »

hunspell question

normal procedure load
p := ExtractFilePath(Application.ExeName) + 'dict\';
spell := hunspell_initialize(PChar(p + 'en_US.aff'), PChar(p + 'en_US.dic'));


where, how can I load, apply this en_US.aff, en_US.dic for richviewedit (rvspell\Demos\HunSpell\RichViewActions)
Sergey Tkachenko
Site Admin
Posts: 17236
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please read the comments in RVHunSpell.pas:
- specify DictDir property (a path to dictionary files; you can leave
it empty if dictionaries are in the application's directory
- add the necessary dicionaries in Dictionaries collection:
- RVHunSpell1.Dictionaries.Add.Load(<language>), where <language> is
a dictionary name (for example, for en_US.dic it is 'en_US';
On successfull loading, Language property of the new collection item
is <language>;
- or call LoadAllDictionaries to load all dictionaries in the path.
sr1111
Posts: 27
Joined: Thu Jan 31, 2008 12:18 pm

Post by sr1111 »

I did into this lines and but not run
RVHunSpell1.Dictionaries.Add.Load('en_us');

after I add hunspelldll.dll now runner

you can add hunspelldll.dll to directory rvspell\Demos\HunSpell\RichViewActions

not run without hunspelldll.dll
Sergey Tkachenko
Site Admin
Posts: 17236
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, dll is necessary.
SergJP
Posts: 4
Joined: Thu Aug 02, 2018 1:50 pm

Re: hunspell for richview

Post by SergJP »

Sorry, I can't install RVHunSpellPkgCB10_2

In RVHunSpell.pas the compiler makes errors:
procedure TRVHunSpell.Check(Editor: TCustomRichViewEdit; Scope: TRVEnumScope);
var Helper: TRVHunSpellHelper;
begin
Helper := TRVHunSpellHelper.Create;
try
Helper.RVHunSpell := Self;
Helper.Unicode := True;
Helper.Check(Editor, Scope);
FDialogShown := Helper.DialogShown;
finally
Helper.Free;
end;
end;
[DCC Error] RVHunSpell.pas(894): E2003 Undeclared identifier: 'Unicode'
[DCC Error] RVHunSpell.pas(1074): E2003 Undeclared identifier: 'FWordW'
[DCC Error] RVHunSpell.pas(1110): E2003 Undeclared identifier: 'FTextW'

Maybe I do something wrong?
Sergey Tkachenko
Site Admin
Posts: 17236
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: hunspell for richview

Post by Sergey Tkachenko »

You tried to install an old version of the HunSpell parser.

The new version is in <TRichView Dir>\ThirdParty\HunSpell\Source\, and TRichView Setup installs it automatically.
Post Reply