Project

General

Profile

Bug #2345

already visible frames will sometimes have their screen-buffer updated by changes to the same frame used in streams

Added by Greg Shah almost 10 years ago. Updated almost 10 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

Related issues

Related to Base Language - Feature #1628: fix any incompatibilities or missing features of NO-ECHO support Closed 01/27/2014 01/31/2014

History

#1 Updated by Greg Shah almost 10 years ago

This bug was found in #1628 (see notes 21, 22 and 63).

def var ch1 as char init "1".
def var ch2 as char init "2".
def var i as int.
form ch1 ch2 with frame f1.

message "view frame?" update vf as log.
if vf then view frame f1. /* force frame to be already visible */

message "down in stream?" update isdown as log.

def stream rpt.
output stream rpt to test.txt.

pause message "ch1".
display stream rpt ch1 with frame f1.
if isdown then down stream rpt with frame f1. /* clear the screen buffer for the frame */

pause message "ch2".
output stream rpt close.

display ch2 with frame f1.

pause message "done".

where the final screens are: * vf = no, isdown = no
4GL:
┌─────────────────┐
│ch1      ch2     │
│──────── ────────│
│1        2       │
└─────────────────┘

P2J:
┌─────────────────┐
│ch1      ch2     │
│──────── ────────│
│1        2       │
└─────────────────┘
* vf = yes, isdown = no
4GL:
┌─────────────────┐
│ch1      ch2     │
│──────── ────────│
│1        2       │
└─────────────────┘

P2J:
┌─────────────────┐
│ch1      ch2     │
│──────── ────────│
│         2       │
└─────────────────┘
* vf = no, isdown = yes
4GL:
┌─────────────────┐
│ch1      ch2     │
│──────── ────────│
│         2       │
└─────────────────┘

P2J:
┌─────────────────┐
│ch1      ch2     │
│──────── ────────│
│         2       │
└─────────────────┘
* vf = yes, isdown = yes
4GL:
┌─────────────────┐
│ch1      ch2     │
│──────── ────────│
│         2       │
└─────────────────┘

P2J:
┌─────────────────┐
│ch1      ch2     │
│──────── ────────│
│         2       │
└─────────────────┘

P2J works incorrectly in the case when the frame is already visible, and a widget (which is already displayed) has a different value than the one displayed on screen (the internal screen buffer has changed for that widget). This is case (vf = yes, isdown = no) from above. I think what 4GL does is that, when a widget is displayed, it refreshes all the widgets in the frame, with their latest values from the frame's screen buffer. This behaviour looks like is limited to DISPLAY/UPDATE/PROMPT-FOR/ENABLE - VIEW does not exhibit this.

Also available in: Atom PDF