[sword-devel] BibleTime indexing problem

Troy A. Griffitts scribe at crosswire.org
Sat Mar 3 19:26:50 MST 2012


Gary,

Thank you so much for investing the time to put in the leg work to 
investigate this and provide a concise example that represents the 
problem.  I seems to be a bug in the skipConsecutiveLinks flag with 
regard to Testament 1 Header.

Did you say this only happens on the HunKar module?

I have stepped through the code and something is certainly wrong-- even 
if there is a module bug.  I'm not saying there is one, but even if 
there is a strange link in the headings, the -- operator on the module 
shouldn't jump from Testament 1 Heading to Malachi :)

I'll let you know what I find.  Any more information you have would be 
useful.  Again, thanks for investing the time.  This is exactly what we 
need to debug this.

Troy



On 03/03/2012 06:05 AM, Gary Holmlund wrote:
> Troy,
>
> I found it takes both of these conditions to cause the problem.
> key->Headings(true);
> book->setSkipConsecutiveLinks(true);
>
> The program below outputs Malachi 1:1
>
> Should BibleTime do something different or is this a sword issue.
>
> Gary
>
> #include <iostream>
> #include <swmgr.h>
> #include <swmodule.h>
> #include <versekey.h>
>
> using namespace sword;
> using namespace std;
>
> int main(int argc, char **argv) {
>
> const char *modName = "HunKar";
> SWMgr library;
> SWModule *book = library.getModule(modName);
> if (!book) {
> cerr << "Can't find module: " << modName << endl;
> return -1;
> }
> VerseKey* key = ((VerseKey *)book->getKey());
>
> key->Headings(true);
> book->setSkipConsecutiveLinks(true);
> book->setPosition(TOP);
>
> cout << *key << endl;
> return 0;
> }
>
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list