[sword-devel] Using Alternate Versification

Troy A. Griffitts scribe at crosswire.org
Sat Aug 15 12:24:33 MST 2015


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20150815/389b0639/attachment.html>


More information about the sword-devel mailing list