[prev in list] [next in list] [prev in thread] [next in thread]
List: aspell-user
Subject: [Aspell-user] aspell_speller_main_word_list under windows platform
From: "tao lin" <lams_yi () hotmail ! com>
Date: 2004-03-14 20:31:01
Message-ID: BAY16-DAV22os7UUdUK00004da9 () hotmail ! com
[Download RAW message or body]
Hi, all
I just download the GNU Aspell-0.50.3 (win32) from
http://aspell.net/win32/ and try to write a simple app to test some
API functions Aspell provided. Oh, I am using the Delphi so I use the
AspellHeadersDyn.pas too.
The functions be called in sample project works fine. But some other
functions in the API just not working. For example:
aspell_word_list_elements. The code is quite simple, and I believe every c
programmer should understand it.
Here is my code:
============================================================================
==
type
TWordListType = (wlPersonal, wlSession, wlMain, wlSuggest);
procedure Print_Word_List(const speller: AspellSpeller; const aWordListType:
TWordListType;
aOutputList: TStrings);
var
word_ : PChar; /* A PChar is a pointer to a null-terminated string of
8-bit characters. */
elements: AspellStringEnumeration;
Word_List: AspellWordList;
begin
Word_List := nil;
aOutputList.Clear;
case aWordListType of
wlPersonal: Word_List := aspell_speller_personal_word_list(speller);
wlSession: Word_List := aspell_speller_session_word_list(speller);
wlMain: Word_List := aspell_speller_main_word_list(speller);
end;
if Assigned(Word_List) then
begin
elements := aspell_word_list_elements(Word_List);
repeat
word_ := aspell_string_enumeration_next(elements);
aOutputList.Add(word_);
until (word_ = nil);
end;
end;
============================================================================
==
In my code, aspell_speller_personal_word_list &
aspell_speller_session_word_list works fine, but when I call
aspell_speller_main_word_list, I just got the Runtime Error from MS
Visual C++ runtime Library, then my app just terminate.
Could you give me some suggestion about how to use
aspell_speller_main_word_list please?
--
Cheers,
Tao
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic