Patch sent in

Kenneth Pouncey <[email protected]> Wed, 26 Oct 2005 08:12:25 +0200
Newsgroups gmane.comp.java.tn5250j.general
Message-ID <[email protected]>
Patrick

I will send these to the list.

Mitch Blevins <[email protected]>

Thanks very much for working on tn5250j and making it available under GPL.

We're a mid-size company and plan on rolling a modified version out 
under the projectname of "Jumper".  Jumper is a JNLPized version that 
has hooks to integrate our as400 ERP system (PRMS) with our other sales 
and manufacturing systems.  Although most changes we make would not be 
interesting to a general audience, I'd like to feed any fixes we do to 
the original codebase back to you.  Of course if you are interested in 
seeing all the code additions we've done to tn5250j/Jumper, just drop me 
a line and I can send them to you.

We have been running into a bug where a screen that has been restored 
using tnvt.restoreScreen() did not put the fields in the right place (in 
the Screen5250.addField() method).  I **think** I have the right fix to 
it in the patch below, but I'm not very familiar with the codebase or 
5250-programming in general, so I'd like to run it by you.  The patch 
below appears to fix our symptoms.  It is submitted for you review.

Cheers,

Mitch Blevins

IT Manager

International Environmental

_http://www.iec-okc.com/_ <javascript:ol('http://www.iec-okc.com/');>


Index: 
C:/eclipse/workspace/Jumper2/src/org/tn5250j/framework/tn5250/tnvt.java

===================================================================

--- 
C:/eclipse/workspace/Jumper2/src/org/tn5250j/framework/tn5250/tnvt.java     
(revision 1491)

+++ 
C:/eclipse/workspace/Jumper2/src/org/tn5250j/framework/tn5250/tnvt.java     
(revision 1492)

@@ -1385,7 +1385,7 @@

                sc.write((byte) screen52.getRows()); // store the 
current size

                sc.write((byte) screen52.getColumns()); //    ""

 

-               int cp = screen52.getCurrentPos(); // save off current 
position

+               int cp = 
screen52.getScreenFields().getCurrentFieldPos(); // save off current 
position

                sc.write((byte) (cp >> 8 & 0xff)); //    ""

                sc.write((byte) (cp & 0xff)); //    ""