Project

General

Profile

Bug #2867

investigate PUT SCREEN problems in ChUI on both linux and windows

Added by Constantin Asofiei over 8 years ago. Updated over 8 years ago.

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

0%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Constantin Asofiei over 8 years ago

Use the testcases/uast/frame_hiding_clears_put_screen_run.p and check for any differences between P2J and 4GL, with ChUI terminals on both windows and linux.

Also, address the UiUtils.hideFrames TODO related to comparing the names via their name. The comparison should be done via their ID (if it's even needed). An attempt was made to change hideFrames to this, so res[0] is true if all found frames are still live. But this regressed GSO 192, but fixed GSO 210:


      boolean[] res = new boolean[] {false, false};

      Window<?> wnd = current.window();
      if (wnd == null)
      {
         return res;
      }

      Widget<?>[] c = UiUtils.getTopLevelComponents(wnd);
      boolean prevInstance = false;

      ArrayList<Frame<?>> list = new ArrayList<Frame<?>>();
      boolean needPause = false;

      boolean allLiveFrames = true;

      for (Widget<?> component : c)
      {
         if (!component.isVisible() || !(component instanceof Frame))
            continue;

         Frame<?> frame = (Frame<?>) component;

         if (frame.isCanHide() && 
             !frame.isNoHide() && 
             streamed == frame.isStreamed())
         {
            if (frame != current)
            {
               if (frame.isNeedPause())
                  needPause = true;

               list.add(frame);

               if (!frame.isAlive())
               {
                  allLiveFrames = false;
               }
            }
         }
      }

      try
      {
         if (needPause)
            ThinClient.getInstance().pauseBeforeHide();
      }

      finally
      {
         double currentY = (current != null) ? current.screenLocation().y : -1;

         for (Frame<?> frame : list)
         {
            if (frame.screenLocation().y == currentY)
               res[1] = true;

            frame.setVisible(false);
         }
      }

      res[0] = !list.isEmpty() && allLiveFrames; 

      return res;

#2 Updated by Greg Shah over 8 years ago

  • Parent task set to #2677

#3 Updated by Greg Shah over 8 years ago

  • Parent task deleted (#2677)

A useful clarification from Constantin:

When I made the initial change to UiUtils.hideFrames, they were not to fix something... comparing via frame names just didn't look right (unless there is some very unique behaviour in 4GL 9.1d on linux, which got changed in later versions... but I doubt this). This regressed GSO 210 (as it needed that change) and attempting a fix for this, it regressed GSO 192.

Moving back to comparing the frames via their name solves the PUT SCREEN issues in both tests. But to me this doesn't make the code in UiUtils.hideFrames right.

I agree, the current approach needs to be improved.

Also available in: Atom PDF