<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 11, 2013 at 7:51 PM, Troy A. Griffitts <span dir="ltr"><<a href="mailto:scribe@crosswire.org" target="_blank">scribe@crosswire.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Karl,<br>
<br>
I just checked in a "showchapter.cpp" example here, which I think represents your use case:<br>
<br>
<a href="http://crosswire.org/svn/sword/trunk/examples/classes/showchapter.cpp" target="_blank">http://crosswire.org/svn/<u></u>sword/trunk/examples/classes/<u></u>showchapter.cpp</a><br>
<br>
It seems to work for me with this execution:<br>
<br>
./showchapter jonah.3.1<br>
<br>
Could it be the module being used that trips the error? Or maybe the normalization or intros settings on the key?</blockquote><div><br></div><div style>The latter option seems the most likely. Karl and others have seen this behavior starting with r2785, which was the big commit you made regarding the HunKar module's odd behavior in BibleTime when normalization and intros were present and enabled in certain ways. It's possible that the way Xiphos accesses the modules is sufficiently different from BibleTime (BT is av11n aware while Xiphos is not yet) that the code which seems to work OK in BibleTime breaks in Xiphos now.</div>
<div style><br></div><div style>--Greg</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
<br>
Troy</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
On 03/12/2013 01:31 AM, Karl Kleinpaste wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Regrets for not following up until this evening; I can send mail here<br>
only from home, being firewalled at the office these days.<br>
<br>
"Troy A. Griffitts" <<a href="mailto:scribe@crosswire.org" target="_blank">scribe@crosswire.org</a>> writes:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Do you have an idea of how you are using versekey?<br>
When you display a chapter, are you iterating on the key or on the module?<br>
</blockquote>
The essential code is:<br>
<br>
VerseKey *key = (VerseKey *)(SWKey *)imodule;<br>
int curVerse = key->getVerse();<br>
int curChapter = key->getChapter();<br>
int curBook = key->getBook();<br>
<br>
for (key->setVerse(1);<br>
(key->getBook() == curBook) &&<br>
(key->getChapter() == curChapter) &&<br>
!imodule.popError();<br>
imodule++) {<br>
/* ... lots of hacking based on current key ... */<br>
}<br>
<br>
I've been wondering literally for years why key is typecast twice, from<br>
module through SWKey to VerseKey, but this code predates my presence and<br>
there's actually quite a lot that I've learned to accept somewhat<br>
uncritically. If there is a better way to loop through this, by all<br>
means re-educate me.<br>
<br>
--karl<br>
<br>
______________________________<u></u>_________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/<u></u>mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/<u></u>mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br>
</div></div></blockquote></div><br></div></div>