Project

General

Profile

Bug #10875

COMBO-BOX: Ctrl-UP and Ctrl-DOWN keys do nothing

Added by Vladimir Tsichevski 8 months ago. Updated 3 months ago.

Status:
Test
Priority:
Normal
Assignee:
Delia Mitric
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
16276
version_resolved:
reviewer:
production:
No
env_name:
topics:

Related issues

Related to User Interface - Bug #10801: COMBO-BOX issues New

History

#1 Updated by Vladimir Tsichevski 8 months ago

#2 Updated by Vladimir Tsichevski 8 months ago

Run the following example in GUI mode:

DEFINE VARIABLE cb AS CHARACTER VIEW-AS COMBO-BOX
  LIST-ITEMS
  "a12", "b34", "c56" 
  SIMPLE
  SIZE 40 BY 5
  NO-UNDO.
DEFINE FRAME f cb NO-LABEL.
ENABLE ALL WITH FRAME f.
WAIT-FOR CLOSE OF CURRENT-WINDOW.

In this example, a frame with a COMBO-BOX of SIMPLE type is created and enabled.

Press the Ctrl-UP and Ctrl-DOWN keys.

In OE: These key combinations act the same as the keys without the Ctrl modifier: they select the next and previous items in the list.

In FWD: These key combinations do nothing but remove selection.

#3 Updated by Delia Mitric 4 months ago

  • Assignee set to Delia Mitric

#4 Updated by Delia Mitric 4 months ago

  • Status changed from New to WIP

#5 Updated by Delia Mitric 4 months ago

There are two aspects:

  • In FWD GUI mode, the CTRL + UP/DOWN key doesn't work like in OE. The behavior should be the same as for UP/DOWN keys.
  • In FWD ChUI mode, the CTRL + UP/DOWN keys work like UP/DOWN keys, but in OE ChUI mode CTRL + UP/DOWN keys do nothing..

#6 Updated by Delia Mitric 4 months ago

Created task branch 10875a.

#7 Updated by Delia Mitric 4 months ago

It seems that in ChUI mode in FWD, even if we press CTRL-DOWN combo, for example, the "processed" event is CURSOR_DOWN with -116 code.

#8 Updated by Delia Mitric 4 months ago

  • % Done changed from 0 to 50

Committed some changes for GUI issue: 10875a branch rev. 16478.
Added functionality for CTRL_UP and CTRL_DOWN combos.

While testing, found that there is a little problem (in trunk) when we press CTRL_LEFT/CTRL_RIGHT in the combo-box and after that, we press UP/DOWN OR CTRL_UP/CTRL_DOWN.
The desired behavior is to select the previous/next item in the list, but the current behavior is to re-select the current item. Again, this happens just after we "play" with CTRL_LEFT/CTRL_RIGHT keys. Maybe this issue can be treated separately because it is about CTRL_LEFT/CTRL_RIGHT behavior.

#9 Updated by Delia Mitric 4 months ago

  • % Done changed from 50 to 100
  • Status changed from WIP to Review

Created a new issue in User Interface for CTRL + UP/DOWN events behavior in ChUI mode because in FWD they don't work properly: #11319

The solution for current issue is committed to 10875 rev. 16478.

Hynek, please review. Thanks!

#10 Updated by Hynek Cihlar 4 months ago

  • Status changed from Review to WIP
  • % Done changed from 100 to 90

Code review 10875a.

DefaultList history header format error. The new history entry reads * 016 DMM 20260320 but should read ** 016 DMM 20260320 (two asterisks, one space, matching the format of all preceding entries).

DefaultList: duplicate switch cases could use fall-through. In DefaultList.processKey, the new Key.VK_CTRL_CURSOR_DOWN case is identical to the existing Key.VK_CURSOR_DOWN case (both set delta = 1), and likewise Key.VK_CTRL_CURSOR_UP duplicates Key.VK_CURSOR_UP (delta = -1). These should use case fall-through instead of duplicating the body:

         case Key.VK_CURSOR_DOWN :
         case Key.VK_CTRL_CURSOR_DOWN :
            delta = 1;
            break;

ComboBoxGuiImpl.processSystemKey: action code vs. key code mismatch and incorrect handling in DROP-DOWN/DROP-DOWN-LIST modes. The variable key is assigned from keyEvent.actionCode() (line 761), which returns Keyboard.KA_* action codes. The guard condition at line 764 correctly compares key against Keyboard.KA_* constants, but the new addition compares key against Key.VK_CTRL_CURSOR_DOWN and Key.VK_CTRL_CURSOR_UP, which are key codes (values 2549 and 2550 from Key.java) from a different numeric space. Should the Ctrl+UP/DOWN handling be also added to DROP-DOWN and DROP-DOWN-LIST modes? Currently it is not.

#11 Updated by Delia Mitric 4 months ago

  • % Done changed from 90 to 100
  • Status changed from WIP to Review
Fixed:
  • the history entry
  • the new addition from ComboBoxGuiImpl.processSystemKey by using the key code, not the action code
  • the duplicate code from DefaultList.processKey

Added CTRL + UP/DOWN handling also for DROP-DOWN / DROP-DOWN-LIST COMBO-BOX options.
(All changes for GUI mode)

This is a testcase that contains different types of combo-box:

def var c1 as character view-as combo-box list-items "1", "2", "3", "4", "5", "6", "7", "8", "9" drop-down-list inner-lines 4.
def var c2 as character view-as combo-box list-items "11", "12", "13", "14", "15", "16", "17", "18", "19" simple inner-lines 4 size 12 by 4.
def var c3 as character view-as combo-box list-items "1", "2", "3", "4", "5", "6", "7", "8", "9" drop-down inner-lines 4 size 12 by 4.

def frame f
    c1 at row 1 col 1
    c2 at row 1 col 20
    c3 at row 1 col 40
    WITH SIDE-LABELS.

c1:screen-value = "1".
c2:screen-value = "12".
c3:screen-value = "8".

enable all with frame f.

wait-for window-close of current-window.

Committed to *10875a rev. 16479 *.
Please review.

#12 Updated by Hynek Cihlar 4 months ago

  • Status changed from Review to Internal Test

Code review 10875a. The changes look good. Please regression test the changes, also include ChUI regression tests.

#13 Updated by Delia Mitric 4 months ago

Smoke testing for Hotel GUI and a Customer GUI app passed successfully.

#14 Updated by Razvan-Nicolae Chichirau 3 months ago

ChUI regression tests passed with 10875a.

#15 Updated by Delia Mitric 3 months ago

Another Customer app was tested also. No regression found.

The testing phase is done.
I think this is ready to be merged.

#16 Updated by Radu Apetrii 3 months ago

  • Status changed from Internal Test to Merge Pending

I think this is good. 10875a can be merged right now.

#17 Updated by Delia Mitric 3 months ago

  • Status changed from Merge Pending to Test

Branch 10875a was merged into trunk as rev. 16515 and archived.

Also available in: Atom PDF