[sword-devel] Using Alternate Versification

Troy A. Griffitts scribe at crosswire.org
Sat Aug 15 13:00:04 MST 2015


Typo fix and more precise:


VerseKey *key = (VerseKey *)module->createKey();
refRange = key->parseVerseList(reference.c_str(), *key, true);
... rest of your code ...
delete key;


On 08/15/2015 09:24 PM, Troy A. Griffitts wrote:
> That code should work unchanged, but you need to get your key variable
> from the module itself to be sure you can iterate the entire
> versification of the module. You can use (VerseKey)module->createKey()
> to get it and be sure to delete key when you are done.
> 
> On August 15, 2015 2:20:39 PM GMT+01:00, "David "Judah's Shadow" Blue"
> <yudahsshadow at gmx.com> wrote:
> 
>     So, I'm hacking some more on BIBISH, and I'm wondering if my code needs any 
>     modification to handle alternate versifications. Essentially, I get a 
>     reference from the user, and then iterate over the passage and put it in a 
>     string, here's my code. 
> 
>     refRange = key.parseVerseList(reference.c_str(), key, true);
>     for(refRange = sword::TOP; !refRange.popError(); refRange++) {
>      module->setKey (refRange);
>             text += " "; //TODO: Fix this to show the book name on the first verse
>             //TODO: show chap and verse only after the first verse
>             text += module->getKeyText();
>             text += " ";
>             text += module->renderText();
>     }
> 
>     ------------------------------------------------------------------------
> 
>     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
> 
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> 
> 
> _______________________________________________
> 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