James

Comments inside.

James Rich wrote:

On Fri, 3 Jun 2005, Kenneth Pouncey wrote:

I do believe I have some answers to some of your questions. If not maybe we can work out some of this together.


The problems I'm having now involve knowing what to send to the host when the user presses enter on a selection field. I've gotten some things to work by dumb luck. But my luck appears to have run out :( The part of the manual I'm looking at is:

http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/CO2E2001/15.6.13.5?DT=19950629163252

It isn't clear to me exactly what the iSeries host is expecting. I've done some sniffing of iSeries Access to see what it does. Interestingly, iSeries Access sends some data that according to IBM is never supposed to be sent. I have the ethereal sniff if you would like to look at it. I haven't made much progress with it so far.


I now have single choice selection fields being parsed and sending the correct information. I sat down on thursday and started again and on friday finally got it going. Still a small problem with laying out the options correctly but hopefully have that worked out next week. Then on to multiple choice fields. Not sure what the control is to tell the options to go left to right and top down or top down and then left to right. I think it is the relationship between the number of columns and rows. Was just happy that I finally figured out what the hell they were wanting sent. If the information is sent the correct way the option for the choice is automatically filled into the field for you by the controller. I kept thinking that the information would be sent in the minor structures and we were responsible for sending back the correct option but that is not the case.

The only difference between what I send and what Access sends is a stupid 0x80 in the data stream. I do not send it and it still works. Trying to figure out why they do some of the things they do in the data stream is a pain in the behind. It is all un-documented so you just plug away until it works. That 0x80 might come back and bite me in the ass later and would not be the first time that happened :-)

The big catch was keeping track of the selection id and making sure that the correct one was sent back. Oh yeah and then adding 0x1F to the selection id. If not it will not work.

As you get into it more ask me questions because if the selection id is not kept track of correctly you will spend a significant amount of time with it not working. Believe you me a significant amount of time.

Also have to work on the save and restore of the datastreams for these types as well. That is one of the reasons I wanted to get the window code working that way as well. Oh man that is going to be a PITA.


Also got windows working as objects and saving and restoring them. How is that going for you?


I'm mostly there. Sometimes the iSeries doesn't send the CREATE WINDOW command which is odd. And I'm not saving and restoring multiple windows. But it works for 99% of the work I do.

Yeah that is what I was doing before. 99% is basically what I had but now am now closer to the 99.8%. Still one little problem with repainting for restores. It only happens every once in a great while so have not pinned it down to exactly what it is. Only happens when restoring over already restored windows where it will not display graphically the border but leaves the .and : characters. Not clearing the body correctly I guess. Anyway normal window graphic processing now works like a charm.

I have a special window program in rpg that I use for testing if you would like it. It does not use DSPF but API window commands. It was taken from an example IBM documentation C program years ago and I converted it into RPG. Not sure if they now have the program in RPG or not. The thing I like about it is that it gives options by pressing a command key to move the window on the screen or resizing the window on the fly. That way there is no changing of a DSPF everytime yo want to test overlays in certain places on the screen.


I wish I understood java better. I couldn't even find where tn5250j handles the CREATE WINDOW command. All I could find that looked relevant was a big block of code that was commented out.

Aaahh I ripped it all out now. The commented code was there for backup reasons. I do believe you will find the create window in a new file called WTDParser.java. But even that in CVS is outdated and the code still needs a little clean up. Maybe it is not your understanding of java but all the re-arranging of the code that I did. Total revamp of the modules and rewrite of most of the modules.

I have had a lot of stuff on hold that has not been put into CVS because of lack of time. Was planning on doing that today but all the sources I sent myself got erased by a new mail program that we have on our ISP for my company. It actually looked inside the zip file and found a .bat file so thought it was dangerous and deleted the whole file. So it will have to wait until next week and I go back to the client site.

I will send you the code (it is a mess right now though) on Monday. I will have to redo the code and break it into smaller methods to handle the different parsing parts for different selection field types. It only handles SNGCHC right now. Also it is not graphic based like Access but instead places a field next to each option. Later will make them graphic buttons for selection by mouse.

Let's keep track of the conversations on the tn5250j-general list if that is ok. I sent this to the list so if anybody else wants to join in they can. Not sure if you like the tn5250j emulator or not but can send you a .jar for you to run and see what it does if you would like. When I get it all into cvs again then we can build against that and use CVS for the tests.

Regards

Kenneth


James Rich

It's not the software that's free; it's you.
    - billyskank on Groklaw




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Tn5250j-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tn5250j-general

Reply via email to