[jsword-devel] Patch for clean install

Joe Walker jsword-devel@crosswire.org
Thu, 25 Mar 2004 23:55:50 +0000


About to go to bed.
Had a quick look, applied - Thanks!
I've got thoughts on the verse thing but more tomorrow.

Joe.

DM Smith wrote:

> On a clean install, with no books installed there are null pointer 
> errors in the CommentaryPane and in DisplaySelectPane. This is because 
> the calls to get the selected item from the combo boxes returns a null 
> BookMetaData. In CommentaryPane, I had the routines check for null and 
> if null, returned. With DisplaySelectPane, I checked for null and if 
> null, popped up a warning and returned.
>
> I fixed a small display bug with the commentary verse picker. When you 
> chose a book that had more than 99 chapters or a chapter that had more 
> than 99 verses, the combo box would display "..." for numbers higher 
> than 99. The solution was to use a prototype display value.
>
> I also fixed the BooksComboBoxModel to update the selection correctly.
>
> I made a few small changes to build.xml. The jdepend was recommending 
> a change so I did that. I also based findbugs on "jnlp" rather than 
> "jar".
>
> I have found another bug in the workings of the commentary verse 
> picker. If you change the book to Psalms and then the chapter to 119 
> and then change the book to 1 John, it still shows the chapter as 119, 
> but the drop down does not list it. I began poking around in the code 
> and I found another problem. 1 John 119.1 computes a verse based upon 
> addition. According to the comment in the documentation for the Verse 
> constructor, this allows for addition, Gen 1.50 would yeild something 
> in Gen 2 because there are less than 50 verses in Gen 1. In the 
> context of a verse picker, I think that this violates my "least 
> suprise" principle.
>
> I think the user would be suprised that the selected verse was not 
> valid and was re-adjusted to something else.
>
> I tried to simulate a different algorithm to establish the "viewed 
> verse" for BibleComboBoxModelSet. I was able to get that to work by 
> setting in BibleComboBoxModel the chapter and verse to 1 when a new 
> book was selected and setting the verse to 1 when a new chapter is 
> selected. However, the display did not update. When I tried to adjust 
> the display, I got into an infinite loop. Anyway, I'll figure it out.
>
> _________________________________________________________________
> Is your PC infected? Get a FREE online computer virus scan from 
> McAfeeŽ Security. 
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963