[sword-devel] Headings and Intros

Stephan Tetzel stephan.tetzel at online.de
Wed Feb 29 11:23:55 MST 2012


Troy,

thank you for help. Intros are working now.

Stephan

Am 29.02.2012 12:34, schrieb Troy A. Griffitts:
> Stephan,
>
> There is a fundamental peace if info that might clear this up:
>
> modules maintain their own keys unless you set them with a persistent
> key. So your code would probably work with one addition:
>
>  > VerseKey vk = VerseKey(key);
>  > vk.Headings(true);
>  > vk.setChapter(0);
>  > vk.setVerse(0);
>
> vk.setPersist(true);
>
>  > module->setKey(vk);
>  > std::cout << module->RenderText() << "\n";
>
> But for av11n, it's better not to construct your own VerseKey (it will
> default to KJV), but instead reference the key inside the module:
>
> VerseKey *vk = (VerseKey*)module->getKey();
>
> vk->Heading(true);
> vk->setChapter(0);
> vk->setVerse(0);
>
> std::cout << module->RenderText() << "\n";
>
>
> Hope this helps.
>
>
> On 02/29/2012 07:15 AM, Stephan Tetzel wrote:
>> Hi,
>>
>> I've tried to add book intros to BibleZ HD, but it doesn't work.
>>
>> It is working on my PC (sword-1.6.1 - default in ubuntu 11.10) with this
>> little code:
>>
>> VerseKey vk = VerseKey(key);
>> vk.Headings(true);
>> vk.setChapter(0);
>> vk.setVerse(0);
>> module->setKey(vk);
>> std::cout << module->RenderText() << "\n";
>>
>> But if I use this in my static lib (sword-1.6.2 - build with:
>> ./configure --host=arm-none-linux-gnueabi --without-icu
>> --without-clucene --enable-static) it doesn't work. If I try to access
>> the intro from John 1 in GerNeUe and set the Chapter and Verse to 0 the
>> VerseKey is set to Luke 24:56.
>>
>> There is another problem I have with the most recent version of GerNeUe.
>> I'm not able to access chapter headings at the beginnig of a chapter.
>> (like Exodus 3, I get the heading of verse 16 in GerNeUe but not the one
>> of verse 1). This was ok since the last module update.
>>
>> Best Regards,
>> Stephan
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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