[jsword-devel] Help with verse 0 problem
Martin Denham
mjdenham at gmail.com
Fri Jul 5 14:20:06 MST 2013
To clarify the problem a little, the issue is that Obadiah is a single
chapter book and so 'Obd 1' is interpreted as 'Obadiah verse 1' not chapter
1. Before chapter 0 and verse 0 were introduced 'Obd' was interpreted as
'Obadiah chapter 1' but no longer. So the problem is I don't know how to
specify 'Obadiah chapter 1' as a string - or maybe the previous long string
would work i.e. include the word chapter before 1.
The parsing is spread out around and Bible but the key parts are:
Key reading = PassageKeyFactory.getKey( 'Obd' ))
Verse verse = KeyUtil.getVerse(key);
// show chapter containing verse
Martin
On 5 July 2013 22:01, Chris Burrell <chris at burrell.me.uk> wrote:
> 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
>>
>>
>
> _______________________________________________
> 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/089a7ed9/attachment.html>
More information about the jsword-devel
mailing list