Project

General

Profile

Bug #2764

Bug #2677: fix drawing and functional differences between P2J GUI and 4GL GUI

MESSAGE UPDATE in GUI doesn't honor numeric format string

Added by Greg Shah over 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:

message_update_4gl_2.jpg - Message update just before digit press in 4GL (36.8 KB) Eugenie Lyzenko, 10/21/2015 04:28 PM

message_update_4gl_0.jpg - 4GL after digit (36.3 KB) Eugenie Lyzenko, 10/23/2015 05:34 PM

message_update_p2j_after_digit_20151021.jpg - P2J after digit (34.6 KB) Eugenie Lyzenko, 10/23/2015 05:34 PM

History

#1 Updated by Greg Shah over 8 years ago

Starting in trunk 10948 or 1811s 10994, run message-update6.p.

Enter "Y" to the first prompt. At the second prompt, there should be a numeric format "99" but it does not edit properly. Typing "8" should result in "08" but instead it results in "80".

#2 Updated by Greg Shah over 8 years ago

  • Assignee set to Eugenie Lyzenko

#3 Updated by Eugenie Lyzenko over 8 years ago

Some investigations for GUI fill-in issue. There are several issues/deviations from 4GL here.
1. GUI fill-in does not support ? as initial value. The other initial digits work.
2. GUI fill-in does not properly replaces the currently selected text. Originally the test has selected ? value to be replaced with the new digit from keyboard. If we replace ? with some other initial digit - P2J will have correct initially selected value. However pressing 8 at this time gives 80, not expected 08.
3. On the other hand if to move the cursor to the right most digit position(without any selection) and press 8 - P2J correctly accepts 08 in GUI.

So need to fix:
- digit replacement for selected value
- handling the unknown value as initial selection

Continue working. The screen with fill-in before digit press in 4GL attached here.

#4 Updated by Eugenie Lyzenko over 8 years ago

Task branch 1811s for review updated to revision 11020.

This message update fix. Now the digit value displays properly on pressing 8.

#5 Updated by Greg Shah over 8 years ago

It looks good. Let me know when you have the unknown value fix.

#6 Updated by Eugenie Lyzenko over 8 years ago

Greg Shah wrote:

It looks good. Let me know when you have the unknown value fix.

I'm thinking about this issue. For now I can not tell exactly about time frame. Because it is possible the conversion level rule changes can be required to implement this(to generate setUnknown() method for integer variable). Need to perform some testing in 4GL to see if we can make only runtime change(for example if any integer without init value can be considered as unknown).

#7 Updated by Greg Shah over 8 years ago

Because it is possible the conversion level rule changes can be required to implement this(to generate setUnknown() method for integer variable).

The original testcase explicitly initializes the variable to unknown value:

def var num as int init ?.

We support this already. The java code:

integer num = new integer();

num will be set to unknown value in P2J too. This is not the issue.

Need to perform some testing in 4GL to see if we can make only runtime change(for example if any integer without init value can be considered as unknown).

By default, when an init value in the 4GL is omitted for an integer variable, the initial value is 0. We support this just fine. In our case, we actually DO have an initial value specified, it is the ? literal. As noted above, this is not the problem.

The issue is in the UI. Either we are not storing the unknown value properly in the screen buffer. Or if it is properly in the screen buffer, we are not honoring it in the DisplayFormat and/or the FillInGuiImpl.

#8 Updated by Greg Shah over 8 years ago

Either we are not storing the unknown value properly in the screen buffer. Or if it is properly in the screen buffer, we are not honoring it in the DisplayFormat and/or the FillInGuiImpl.

Hmmm, actually this is not right. We don't use screen buffers for MESSAGE UPDATE. The problem is in LogicalTerminal.message(), ThinClient.message() or in Window.tinyInput(). Somewhere in there, we don't handle unknown value properly.

#9 Updated by Eugenie Lyzenko over 8 years ago

You are right, the integer variable is properly initialized as unknown and passed to the client side without change. The problem begins when Window class reconstructs the FillIn widget to display within the message(Window.tinyInput()). Looking for solution. Expect to have it later today.

#10 Updated by Eugenie Lyzenko over 8 years ago

In 4GL for GUI and ChUI the processing of the initial unknown value is the same:
- All data types are able to use "?" as iniitial value except date
- The date type variable does not display "?" initially.

In P2J the problematic place is in Window.tinyInput():

...
      if (!var.isUnknown())
         sb.putWidgetValue(id1, var.duplicate());
...

Preparing the solution and additional testcases to verify the fix.

#11 Updated by Eugenie Lyzenko over 8 years ago

The addition, date exception means all data related variables: date, datetime and datetime-tz. All of them do not display ? initially in both ChUI and GUI.

#12 Updated by Eugenie Lyzenko over 8 years ago

The standalone testcase has been added to repo to check different data types:message-update7.p revision 1389. The testing shown the correct behavior for ChUI and GUI. Going to commit into 2677a when initial repo pulling will be done.

#13 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2677a for review updated to revision 10952.

The fix for initial unknown value for MESSAGE UPDATE statement. Checked to compare with ChUI and GUI modes.

#14 Updated by Eugenie Lyzenko over 8 years ago

One more deviation between P2J and 4GL has been found in this issue. Consider message_update_4gl_0.jpg and message_update_after_digit_20151021.jpg attached here. The cursor position in P2J is located before the digit typed, while in 4GL it is located after.

Looks like a kind of cursor location handling error in FillInGuiImpl. Should this bug be fixed in this task or it is already under fixing in some other task? Or need to create separate task for it?

#15 Updated by Greg Shah over 8 years ago

The cursor position in P2J is located before the digit typed, while in 4GL it is located after.

Looks like a kind of cursor location handling error in FillInGuiImpl. Should this bug be fixed in this task or it is already under fixing in some other task? Or need to create separate task for it?

Constantin: do you expect to fix this in #2727?

#16 Updated by Constantin Asofiei over 8 years ago

Greg Shah wrote:

The cursor position in P2J is located before the digit typed, while in 4GL it is located after.

Looks like a kind of cursor location handling error in FillInGuiImpl. Should this bug be fixed in this task or it is already under fixing in some other task? Or need to create separate task for it?

Constantin: do you expect to fix this in #2727?

This is something specific for numeric formats; yes, I can work on it part of #2727.

#17 Updated by Greg Shah over 8 years ago

  • Status changed from New to Closed

#18 Updated by Greg Shah over 8 years ago

  • % Done changed from 0 to 100

#19 Updated by Greg Shah over 7 years ago

  • Target version changed from Milestone 12 to GUI Support for a Complex ADM2 App

Also available in: Atom PDF