[sword-devel] breakage in verse management at -r2785?

Greg Hellings greg.hellings at gmail.com
Mon Mar 11 17:55:37 MST 2013


On Mon, Mar 11, 2013 at 7:51 PM, Troy A. Griffitts <scribe at crosswire.org>wrote:

> Thanks Karl,
>
> I just checked in a "showchapter.cpp" example here, which I think
> represents your use case:
>
> http://crosswire.org/svn/**sword/trunk/examples/classes/**showchapter.cpp<http://crosswire.org/svn/sword/trunk/examples/classes/showchapter.cpp>
>
> It seems to work for me with this execution:
>
> ./showchapter jonah.3.1
>
> Could it be the module being used that trips the error?  Or maybe the
> normalization or intros settings on the key?


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.

--Greg


>
>
> Troy
>
>
>
>
> On 03/12/2013 01:31 AM, Karl Kleinpaste wrote:
>
>> Regrets for not following up until this evening; I can send mail here
>> only from home, being firewalled at the office these days.
>>
>> "Troy A. Griffitts" <scribe at crosswire.org> writes:
>>
>>> Do you have an idea of how you are using versekey?
>>> When you display a chapter, are you iterating on the key or on the
>>> module?
>>>
>> The essential code is:
>>
>>      VerseKey *key = (VerseKey *)(SWKey *)imodule;
>>      int curVerse = key->getVerse();
>>      int curChapter = key->getChapter();
>>      int curBook = key->getBook();
>>
>>      for (key->setVerse(1);
>>          (key->getBook()    == curBook)    &&
>>          (key->getChapter() == curChapter) &&
>>          !imodule.popError();
>>          imodule++) {
>>          /* ... lots of hacking based on current key ... */
>>      }
>>
>> I've been wondering literally for years why key is typecast twice, from
>> module through SWKey to VerseKey, but this code predates my presence and
>> there's actually quite a lot that I've learned to accept somewhat
>> uncritically.  If there is a better way to loop through this, by all
>> means re-educate me.
>>
>> --karl
>>
>> ______________________________**_________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/**mailman/listinfo/sword-devel<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<http://www.crosswire.org/mailman/listinfo/sword-devel>
> Instructions to unsubscribe/change your settings at above page
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130311/70d0a41d/attachment.html>


More information about the sword-devel mailing list