I've got to the point that I have got the 3270 part working - connecting to the host etc. by mashing up with the s3270 program (of the x3270 suite).
I can now display a screen! 3270/Mainframe screens are essentially totally made up of fields which can be protected (readonly) or non-protected (where a user can put their input). Originally I was going to map protected fields to WText - but the problem I have here is that it seems to remove training (and perhaps leading) spaces - as you can imaging disastrous to a fix font old fashioned layout! I tried resizing the WText() to no effect. I tried using "<pre></pre>" tags but it then seemed to put each field on a new line(?) Note to self - I need to retry this with an explicit inline(). So I tried mapping all fields to WLineEdit. After fiddling with Margins (I had to set a negative one), Padding and Borders I got the spacing working great. I setReadOnly() for protected fields. WLineText has the setTextSize() which allows me to mitigate any trailing space character removal. The issue I have now is that although the field is read only it can still be selected (i.e by the mouse or by tabbing). What I would like is that a readonly field be unselectable - so when you tab you tab through the "unprotected" fields only. Is it feasibly to achieve this do you think? If so would this be an acceptable change to Witty? Or could you please give me a hint of what code I should look to change - I would make a special version or WLineEdit. Or do folks think it would make more sense (simpler) to make a version of WText that somehow keeps spaces. Perhaps adding a setTextSize() member function. And use WText for protected fields. Disabling the WLineEdit control greys it out ... if I could stop it greying out I could disable() rather than set ReadOnly() - is this possible? Note to self - is there a CSS way to do this? Keyboard On a 3270 Terminal once a screen is displayed the user can update any unprotected fields - and tab though them etc. - all with no communication to the host. Only when he presses ENTER or a Function key (e.g. F1), does the update go to the host and the screen redrawn. I.e. Designed to take processing of off the host. I want to kind of work the same way. So I only want to use a SLOT for an enter key and a Function key. I can see an event for ENTER but not for the Function keys. I don't want to get an event for every single key press (lots of round trips). Again would this be an acceptable change to Witty (to provide a Function key event) - and/or could someone give me a hint of what code I should look at to try and implement this? Or should I be using a JSlot for all keyboard events and somehow generate Function key events myself? Any hints/example code would be very welcome! Sorry for the long post - and thanks for all the help. Apologies if I have a slight backlog of replies - I have been on holiday .... I am still working on getting the treelist layout working for me (now I have got rid of my stupid memory error things might work better!) Adrian 2009/5/5 Koen Deforche <[email protected]>: > Hey Adrian, > > 2009/5/5 Wim Dumon <[email protected]>: >> I would say to use Wt's server push capabilities to render updates to >> the screen, and to attach slots to the key signals. I would write it >> all in C++, and first do a version without custom JavaScript, which >> updates the entire viewable area on every update. There's a good >> chance that you will decide it is good enough. Lateron, you could >> provide some optimizations with custom JavaScript (e.g. provide >> functions to do scrolling, or update a single line on the client >> side). >> A separate thread can also interact with Wt widgets provided that it >> grabs the global update lock (see documentation of WApplication), so >> that part of your architecture is ok. > > You could perhaps start with a separate widget per line. In that way you > can more easily upgrade to smarter rendering strategies: > - scrolling by deleting/adding lines > - partial updates based on a specific line. > > Sounds like a fun project (except for the terminal handling part time-warp > :-) ) > > Regards, > koen > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > witty-interest mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/witty-interest > ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
