[sword-devel] SwordReader ........

Barry Drake b.drake at ntlworld.com
Thu Nov 22 05:35:35 MST 2007

Hi there ........

I've been looking at the code in SwordReader SwordIndex.cpp.  The 
following fragment is responsible for retruning and displaying the 
results of a search.

    Verse verses(from,to);
    sword::ListKey results;

// this next call is the one that does the search
        2 /* case insensitive */,
// the above 6 lines carry out the search and return the verse 
references as a 'ListKey' item
    for (int i=0;i<results.Count();i++) {
// the above adds the ListKey elements to the window for display

This used to work OK in the binaries that Johan Gorter provided in 
2004.  Troy has made a few alterations to make the frontend build 
against the current Sword engine.  Currently, the correct number of 
search hits are recorded, but all of them show as the first 'hit'.  As 
an example, searching the book of Amos for 'amos' gets seven hits - the 
correct number.  But all of them are returned as 'Amos 1:1' which is the 
first hit. 

As far as I can see, Troy has not modified anything that could affect 
the search, so I guess something has changed in the way in which 
SWModule::search operates.  Has anything changed here that could affect 
operation?  Or has something changed in the ListKey::GetElement() 
function?  I hope I'm not asking too dumb a question here.

God bless, 

-- From Barry Drake (The Revd) minister of the Netherfield United Reformed church, Nottingham see http://www.jesusinnetherfield.org.uk for our church homepages).

Replies - b.drake at ntlworld.com

More information about the sword-devel mailing list