Maybe swapping the order of chapter and verse around may help? The code I remember does some special handling of zeroes, but I can't check it at the moment.<div>e.g.<br><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "> vkey->Verse(0);</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "> vkey->Chapter(0);</span></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">to</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-style-span" style="font-size: 13px; "> vkey->Chapter(0);</span></span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-style-span" style="font-size: 13px; "> vkey->Verse(0);</span></span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br clear="all"></span></font>God Bless,<br>Ben<br>-------------------------------------------------------------------------------------------<br>
Multitudes, multitudes,<br> in the valley of decision!<br>For the day of the LORD is near<br> in the valley of decision.<br><br>Giôên 3:14 (ESV)<br><br>
<br><br><div class="gmail_quote">On Thu, Dec 2, 2010 at 9:48 AM, Greg Hellings <span dir="ltr"><<a href="mailto:greg.hellings@gmail.com">greg.hellings@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
One of the commentaries I have has a book header (in this instance it<br>
is for 1 Peter) which is held in the module in the key "1 Peter 0:0".<br>
Behavior concerning that introduction varies with different<br>
applications.<br>
<br>
1) example/cmdline/lookup 'A Commentary on I Peter' '1 Peter 0:0'<br>
This works perfectly.<br>
2) diatheke -b 'A Commentary on I Peter' -k 1pet.0.0<br>
This autonormalizes to James 4:17 or something similar. 1pet.1.0<br>
autonormalizes to James 5:22 or thereabouts. Diatheke seems to lack a<br>
call to AutoNormalize(0), so this behavior - while suboptimal IMHO -<br>
is expected. Perhaps one of the diatheke options disables<br>
autonormalizing and turns on Headings, not sure.<br>
3) Bibletime, opening the module to 1 Peter 1:1<br>
This displays the heading plus the contents of the verse 1:1, and<br>
autoscrolls the display to where the 1:1 text begins. This is<br>
Bibletime's expected behavior and is good.<br>
4) Xiphos, opening the module to 1 Peter 1:1<br>
This displays the text of 1 Peter 1:1 and is good. I then right click<br>
on the commentary panel and select Dispaly Book Heading. This brings<br>
up a blank panel. The same with Display Chapter Heading. I was<br>
hashing this over on IRC before Karl had to leave and we were<br>
comparing Bibletime and Xiphos' code. The relevant portion of<br>
Bibletime's code appears to be here:<br>
<a href="http://gitorious.org/bibletime/bibletime/blobs/master/src/backend/rendering/centrydisplay.cpp#line42" target="_blank">http://gitorious.org/bibletime/bibletime/blobs/master/src/backend/rendering/centrydisplay.cpp#line42</a>.<br>
It doesn't seem terribly different from Xiphos' code which begins<br>
around line 114 of src/main/sword.cc in terms of how it actually uses<br>
the engine.<br>
<br>
Xiphos' code reads thus at that point:<br>
<br>
VerseKey *vkey;<br>
SWMgr *mgr = backend->get_mgr();<br>
<br>
backend->display_mod = mgr->Modules[mod_name];<br>
vkey = (VerseKey*)(SWKey*)(*backend->display_mod);<br>
vkey->Headings(1);<br>
vkey->AutoNormalize(0);<br>
vkey->Verse(0);<br>
vkey->Chapter(0);<br>
backend->display_mod->Display();<br>
<br>
which doesn't seem to work properly. When I change that code to this<br>
<br>
VerseKey *vkey;<br>
SWMgr *mgr = backend->get_mgr();<br>
<br>
backend->display_mod = mgr->Modules[mod_name];<br>
vkey = (VerseKey*)(SWKey*)(*backend->display_mod);<br>
vkey->Headings(1);<br>
vkey->AutoNormalize(0);<br>
SWBuf ll = SWBuf(vkey->getOSISBookName());<br>
ll += " 0:0";<br>
vkey->setText(ll.c_str());<br>
backend->display_mod->Display();<br>
<br>
it behaves as expected. I discovered this "workaround" when I was<br>
working on mod2osis and just tried it on Xiphos on a whim.<br>
<br>
What might be going wrong here when Xiphos seems to be doing what I<br>
would understand should display the heading?<br>
<br>
--Greg<br>
<br>
_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br>
</blockquote></div><br></div></div>