
Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
>
>
[quoted text clipped - 12 lines]
>in this project, don't you?)
>
Well, Mr. Thompson, I bow to your superior intellect, and as such i GIVE
UP. I don't want to learn java, I simply wanted to try and fix this
little bug.
However, since you think I'm way out of my league, I'll throw this out
for you, and everyone else that might want to look at it. Ridicule me
all you want.
We have a saying in my profession. "Those that can, do. Those that
can't, instruct."....
The problem is this:
The package reads .pgn chess files, either single game or multiple game
files. PGN files are simply text files, if you've never seen one. If the
*first *pgn game that is in the file does NOT contain all of the tags
listed in chessboard.java starting at line 405
currentGameTags.event = "";
currentGameTags.site = "";
currentGameTags.date = "";
currentGameTags.round = "";
currentGameTags.white = "";
currentGameTags.black = "";
currentGameTags.whiteRating = "";
currentGameTags.blackRating = "";
currentGameTags.result = "";
currentGameTags.ECOCode = "";
currentGameTags.FEN = "";
Then the applet will not load properly (it's garbled), for the *first
game only*. If the file contains all of these tags OR it's the NEXT game
in the very same .pgn file, the applet displays properly.
Later in chessboard.java, the tags are all reset to "" at line 520
gameTags.event = "";
gameTags.site = "";
gameTags.date = "";
gameTags.round = "";
gameTags.white = "";
gameTags.black = "";
gameTags.whiteRating = "";
gameTags.blackRating = "";
gameTags.result = "";
gameTags.ECOCode = "";
gameTags.FEN = "";
My theory (oh pathetic peon that I am) is that if the tags contain data,
even null data, on first read, the garble will not occur, since the
garbling does not occur anywhere except the first game, since all these
tags are set to null after first read. If these fields are set to ""
before first read, then replaced witht the first read data, it might
stop this from happening.
You can view this in action here:
http://www.ragsman.com/chesstest/chesstest.htm
The first game is simply missing the "result" field in the .pgn. If I
were to add the result field into this game, it would work properly.
the other 2 games are missing more than that, with no garbling at all.
A sincere thanks to all of you that tried to help me.
Mark
Andrew Thompson - 30 Mar 2004 11:54 GMT
<lot's of stuff the OP chose to ignore>
> Well, Mr. Thompson, I bow to your superior intellect,
A statement like that will immediately
brand you as a foolish individual to
those that know me.
>..and as such i GIVE
> UP. I don't want to learn java, I simply wanted to try and fix this
> little bug.
Pay someone. (Ya' cheap bastard)
> However, since you think I'm way out of my league, I'll throw this out
> for you, and everyone else that might want to look at it. Ridicule me
> all you want.
I'm about done, ..unless you post again.
> We have a saying in my profession.
The sex industry?
>.."Those that can, do. Those that
> can't, instruct."....
Ahhh, yes, profound sayings. Pity they
don't do you a sh.t-load of good.
And as I have always been saying. Get
youself some example codes* to see how
it's done**, proceed from there and within
no time you will have either..
a) fixed the problem.
b) realized it was more subtle than
you thought.***
* From the link in your first response to you..
<http://groups.google.com/groups?th=a63fd60784105fa0#link2>
** ..well, basically anything in Java!
*** Consult my site also for things like..
Applet/JRE versioning
<http://www.physci.org/codes/jre.jsp>
The Java plug-in (why you cannot assume it
is available - aactually that goes for .NET too)..
<http://www.physci.org/codes/java/plugin.jsp>
My 'solution' to the problem of the MS VM
<http://www.physci.org/jvmclean.jsp>
(..why you can be damn sure the MS VM will
become an ever more rare beast)
So to put it bluntly, get it together or
shrink back into the shadows. Either way
is fine by me, for someone that does not
seem to be able to gain from the advice offered.

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology