Re: CREATE WINDOW structured field (fwd)

"Kenneth J. Pouncey" <[email protected]> Tue, 13 Jul 2004 07:13:22 +0200
Newsgroups gmane.comp.java.tn5250j.devel
Message-ID <[email protected]>
James

Sorry about all of the mix up here.  The e-mail has been changed to 
kjpou  AT pt POINT lu   or using the kjp1    AT   sourceforge POINT net 
it would have gone to this one.

Now about the windows.  I still have a problem with the windows which 
you will see in a second and think I have it figured out but have not 
coded it up.

Usually when a window is created there is a save screen issued and when 
a window is taken off the screen there is a restore screen issued.  So 
in reality you do not have to keep track of windows.  What you have to 
do is save off the window(s) in the save screen and then recreate them 
on the restore screen.  As you notice I do nothing with the clear gui 
command yet.  What I have seen with this is that you would clear all 
gui constucts from the screen in this command that was last created 
since the save screen.  So some marker needs to be used.  In my last 
version I am keeping the actual window structure that was passed so I 
can do this but have not fully implemented it (see below).

I tried saving off the window structure a long time ago but the as400 
was not accepting all the data that I was sending so was not able to 
save off the window structure on a very busy screen so I just saved off 
the characters on the screen so when a restore screen is issued the 
window is not really recreated but just the characters on the screen 
were so the window gets restored like it would look by not using 
enhanced mode.  This means that the characters :...............: get 
restored instead of the graphic symbols.  I have since then redone the 
way I do a save screen and do not know if the window structure would be 
able to be saved off and restored without the as400 complaining.  Also 
this was on a very old model of an as400 and also do not know if the 
controller has changed again.

There is a place in the document that explains how to compress the 
screen data but that did not work either, still too much data.  So what 
I was thinking about doing was coming up with a save screen stucture 
that would then be compressed, using another compression ratio 
algorithm, before being sent back but have not implemented that yet.  
It worked in tests but had other fires burning so did not do anymore on 
it.  Also looking at a Client Access trace they do not use the formula 
in the document either.  I tried like hell to take it apart but after a 
week just plain gave up.

So there are basically two ways to do this:

1.  Save off the screen in our own structure but do not let it go over 
a limit.  This is a magic limit though as can not find the length.  The 
controller seems to know how much it should take because on most 
screens it works but on very busy screens it does not.  Go figure.

2.  Do like I used to do and just send a sequence number of the screen 
to the host and the actually save data is stored in some type of array. 
  This worked fine but enhanced mode screwed me again because it was 
then sending sequences out of order and jumping around.  So I was 
deleting all stuctures greater than the sequence number but somehow it 
was deciding that another one needed restoring but I had already 
deleted it.  Oh the marvels and intellegent controllers.

Hope this helps.  Any other questions let me know.

Regards

Kenneth

On Jul 13, 2004, at 7:05 AM, tn5250j wrote:

>
>
> Begin forwarded message:
>
>> From: James Rich <[email protected]>
>> Date: July 12, 2004 9:29:28 PM CEST
>> To: tn5250j developer list <[email protected]>
>> Subject: [Tn5250j-develop] CREATE WINDOW structured field (fwd)
>> Reply-To: [email protected]
>>
>> I sent this message to Ken but I haven't heard back, so I thought I 
>> should
>> ask here.
>>
>> James Rich
>>
>> ---------- Forwarded message ----------
>> Date: Wed, 7 Jul 2004 13:50:10 -0600 (MDT)
>> From: James Rich <[email protected]>
>> To: KJ P <[email protected]>
>> Subject: CREATE WINDOW structured field
>>
>> Hi Ken,
>>
>> Well it's been a long time, but I'm finally getting somewhere with 
>> tn5250
>> and enhanced mode.  The trouble I'm having is with the CREATE WINDOW
>> structured field.  I have no problems with creating windows per se, 
>> but
>> rather with knowing which window(s) to destroy.  tn5250j works 
>> perfectly.
>> I have a screen with two windows on it, both created with the CREATE
>> WINDOW structured field.  If one of the windows goes away, I don't 
>> see any
>> way that the as/400 tells me which one.  Instead it just sends me the
>> whole screen including the remaining window, but doesn't specify in 
>> any
>> way that the remaining window is indeed a window.  How does tn5250j 
>> handle
>> this?  I've been going over your code but haven't found the answer 
>> yet.
>>
>> James Rich
>>
>> Vs lbh cynl n Zvpebfsg PQ  onpxjneqf, lbh pna urne fngnavp zrffntrf. 
>> Ohg
>> rira jbefr, vs lbh cynl vg sbejneq, vg vafgnyyf gurve fbsgjner!
>>         -- Fcbgvphf ba /.
>>
>>
>> -------------------------------------------------------
>> This SF.Net email sponsored by Black Hat Briefings & Training.
>> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
>> digital self defense, top technical experts, no vendor pitches,
>> unmatched networking opportunities. Visit www.blackhat.com
>> _______________________________________________
>> Tn5250j-develop mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/tn5250j-develop
>>