[jsword-devel] Help with verse 0 problem

Chris Burrell chris at burrell.me.uk
Fri Jul 5 14:01:08 MST 2013


Sounds like a bug for short books. I don't think JSword should be passing
back verses that don't exist. How are you getting the verse?

Are you using

passage.iterator().next() ?

Presumably, the iterator is basing itself from on the versification
ordinal... Perhaps this highlights a bug with our versification tables? In
that for short books, we should not have a chapter 0...
Chris



On 5 July 2013 21:53, Martin Denham <mjdenham at gmail.com> wrote:

> Can I ask for some advice?
>
> And Bible stores strings like 'Matt 1', 'Obd' to specify a daily reading.
>
> For 'Matt 1' PassageKeyFactory returns Matt chapter 1 and AB can correctly
> navigate to the first verse Matt 1:1.
> However for 'Obd' PassageKeyFactory returns Obadiah 0:0-Obadiah 1:21 and
> AB attempts to navigate to the first verse which is Obd 0:0 which normally
> does not exist.
>
> I am a bit stuck for an elegant solution without coding something horrible
> like:
>   if (verse.chapter==0) verse.setChapter(1)
> Any suggestions?
>
> Thanks
> Martin
>
> P.S. If anybody uses the Chronological Daily readings in And Bible you may
> have noticed that pressing Obadiah gave a blank page a couple of days ago
> due to the above issue.
>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20130705/a7603806/attachment.html>


More information about the jsword-devel mailing list