[jsword-devel] Patch for clean install

DM Smith jsword-devel@crosswire.org
Thu, 25 Mar 2004 18:19:38 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_442a_6201_56c9
Content-Type: text/plain; format=flowed

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

------=_NextPart_000_442a_6201_56c9
Content-Type: application/x-zip-compressed; name="patchempty.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="patchempty.zip"

UEsDBBQAAAAIAFaMeTCo8tzycAoAAPMtAAAOAAAAcGF0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