[jsword-devel] Sword drivers
Wed, 16 Oct 2002 19:16:06 +0100
Mark Goodwin wrote:
>Plain text Sword drivers are now working.
Woo Woo. Fantastic. Good work.
I'm just syncing with your code. I noticed one problem that you've
obviously thought "I wonder if there is already a solution to this"; And
You coded words to the effect:
// TODO: perhaps should un-hardcode that -39?
... getText(TESTAMENT_NEW, bookNo-39, ...
So I changed it to:
... getText(TESTAMENT_NEW, bookNo - Books.Names.Malachi, ...
I knew there was some reason for me writing that code ...
>The old Sword drivers, although very elegant were very broken (so
>broken, in fact that I suspect the Sword module format must have
>changed). Rather than figure out why, I just re-implemented the file
>position calculation stuff using LUTs shamelessly stolen from cannon.h
>in Sword (thanks Troy!).
I'm sure it worked once. Although it was a loooong time ago.
>It's worked fine with every Bible I've tried so far, but please note any
>Bible that contains non plain text (i.e. marginal notes / Strong's
>references) will just display the additional data as if it was part of
>the Bible. This can be fixed later (perhaps by someone who knows what
>this markup means).
This is a big question - separate mail ...
>I had to make some changes to ensure Configs are created and loaded
>before the SDI displays to ensure BibleDrivers were correctly configured
>before they were used. I've not yet replaced the splash.setProgress
>stuff because there was lots of work involved, and the configs seem to
>create and load quickly. If people think this needs doing I'll go over
>all the code in Desktop.java changing numbers...
The idea is that BibleDriver et al. give you a dynamic view of what
Bibles are available, so there is a BiblesListener etc. and the
BiblesComboBoxModel *should* listen. I suspect that it doesn't however ...