![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
mkane
Newbie
Joined: June 18 2013 Location: United Kingdom Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Topic: Issue with multiple screen pages and extended modePosted: June 18 2013 at 4:31am |
|
I have been troubleshooting an odd problem with our application which causes the screen to be displayed incorrectly when run in Accuterm. In an effort to track down exactly what is causing the problem, I have written a little test program. I have been successful in replicating the issue in a fairly small chunk of code, but I still haven’t gotten to the root of what’s doing it.
I’m hoping that by sharing my findings on here, somebody will be able to help me pinpoint the problem. The issue seems to only occur when the following two things are true: - The session is set up with multiple screen pages (in accuterm settings Terminal > Screen > Screen pages) - The session switches between normal and extended terminal modes, and the extended mode has over 24 rows. Here are my session settings: Terminal emulation : Wyse 60 Screen size (normal) : 80 columns by 24 rows Screen size (extended) : 160 columns by 46 rows Screen pages : 2 History rows : 500 Automatic line wrap : enabled Oh, and I'm running 7.1a sp2 (7.1.1012) on Windows 7 64 bit. And here is my test program: STX = CHAR(2) SUB = CHAR(26) ESC = CHAR(27) * * set up control sequences * CLS = SUB FWD = ESC: 'K' BCK = ESC: 'J' EXTON = ESC: STX: 'E' EXTOFF = ESC: STX: 'N' * * switch to either normal or extended mode * CRT 'A - extended mode, B - normal mode ' INPUT A BEGIN CASE CASE A = 'A' CRT EXTON: NO.COLS = 160 NO.ROWS = 46 CASE A = 'B' CRT EXTOFF: NO.COLS = 80 NO.ROWS = 24 CASE 1 STOP END CASE * * forward page and clear screen * CRT FWD: CLS: DX = 0; DY = 0; GOSUB Move * * fill every row * FOR Y = 1 TO NO.ROWS DY = Y - 1 DX = 0 GOSUB Move STRING = (Y 'R%2'): '/': NO.ROWS 'R%2': STR('.', NO.COLS - 6) CRT STRING NEXT Y DX = 0; DY = 0; GOSUB Move STOP * ** ** * Move: ** equiv to @(DX,DY): * STRING = ESC: 'a': (DY + 1) 'R%2': 'R': (DX + 1) 'R%3': 'C' CRT STRING: RETURN Please excuse the hard coded sequences, I wanted to completely rule out any device driver complications. When I run the program and select B (normal mode) the result is as expected:
However when I run the program and select A (extended mode) the screen does not display as expected:
Note that we have a blank line introduced after row 24 – it’s as if Accuterm’s page sizes have got mixed up. From this point on the session is almost unusable. Clearing the screen only clears the first 24 rows for example. Choosing ‘reset terminal’ from the menu brings back order and everything is fine again. Is this a bug in Accuterm and are there any workarounds? Any help or suggestions gratefully received! Mark |
|
![]() |
|
mkane
Newbie
Joined: June 18 2013 Location: United Kingdom Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: June 18 2013 at 7:45pm |
|
Oops, forgot to say the obvious. If I set the 'screen pages' setting back to a single page, the display issue illustrated above doesn't happen. Of course this isn't an option as our application makes much use of terminal paging ..
|
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: June 19 2013 at 12:09pm |
|
Hi Mark -
I have been able to duplicate the problem. I'll let you know when I find the cause. Thanks, Pete |
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: June 21 2013 at 6:09am |
|
Hi Mark -
It appears that the problem is due to the fact that the screen scrolling area is saved for each page. When you are in normal (80 column) mode and switch to the 2nd page, that page has the scrolling region set to the size of the "normal" screen. Now, if you switch back to page 1 and switch to extended (132 column) mode, the first page is re-calculated to use the new page size, but the 2nd page is stuck with the normal page size. I can fix this in the next release, but for now, I think the only work-around is when changing normal/extended mode, switch to each page and change modes. For example, I modified your code that sets the screen mode as follows:
I know the code looks strange. The only way I could find that would force the screen size to recalculate is to change modes on each page. Thanks, Pete |
|
![]() |
|
mkane
Newbie
Joined: June 18 2013 Location: United Kingdom Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: June 23 2013 at 8:03pm |
|
Pete,
Thanks very much for your prompt response. I've just tried your work around and it appears to be working nicely. You're a star. Thanks Mark |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |