Project

General

Profile

Feature #2563

Feature #2252: implement GUI client support

implement GUI EDITOR widget

Added by Greg Shah almost 9 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Start date:
04/30/2015
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD

ca_upd20150509b.zip (171 KB) Constantin Asofiei, 05/09/2015 03:52 PM

ca_upd20150510d.zip (186 KB) Constantin Asofiei, 05/10/2015 10:33 AM

ca_upd20150511a.zip (187 KB) Constantin Asofiei, 05/11/2015 02:57 AM


Related issues

Related to User Interface - Feature #2534: methods/attrs support for EDITOR, SELECTION-LIST and COMBO-BOX Closed 03/06/2015

History

#1 Updated by Greg Shah almost 9 years ago

Please note that MAX-CHARS, RETURN-INSERTED and WORD-WRAP are attributes which need to be implemented as part of this task. They were investigated in #2534. Conversion support and server-side runtime support (setting/getting config values) is already implemented for RETURN-INSERTED. MAX-CHARS and WORD-WRAP are not there yet.

All 3 need client-side implementation as part of the GUI widget implementation. They are GUI-only features.

#2 Updated by Constantin Asofiei almost 9 years ago

First candidate version for a usable EDITOR in GUI. Basic keys (cursor movement, home/end, delete/backspace, text editing) seem to work OK with or without scrollbars. The widget is responsive to mouse events, too.

The current approach is to use the same pseudo-scrolling support as used by ChUI - the scrollbars, although refreshed when the caret moves, do not work OK with the mouse. The headache will be to adjust this to work properly via scrollbars, i.e. the caret can end up "out-of-view".

There were problems in the ChUI editor, too - abends on edge cases when delete/backspace was used.

#3 Updated by Constantin Asofiei almost 9 years ago

New version: fixed 2 editor regressions and some other GUI improvements (FILL-IN colors, LABEL font, IMAGE size).

#4 Updated by Constantin Asofiei almost 9 years ago

ca_upd20150510d.zip has passed runtime testing. But there might be more problematic edge cases (like merging lines on backspace/delete, inserting chars on empty lines, etc) which are common to both ChUI and GUI versions. This one can be released, but next phase should keep in mind to check both ChUI and GUI for issues.

#5 Updated by Constantin Asofiei almost 9 years ago

Eugenie, can you review the ImageGuiImpl change in 0510d.zip? I wonder if you had a specific reason to return width/height 0 if image is not loaded.

#6 Updated by Eugenie Lyzenko almost 9 years ago

Eugenie, can you review the ImageGuiImpl change in 0510d.zip? I wonder if you had a specific reason to return width/height 0 if image is not loaded.

1. This was there when I have started to work on image support.
2. But I think it is reasonable because what to return if image is not here? We can not imagine the actual image size if we have no image. There are many image options that needs actual size, i.e. stretch to fit, offset, size phrase. Also the button size can depend on the image actual size when image is used to draw button. If the image is not loaded, nothing to draw, what is the alternative for width/height?

Imagine two situations:
1. We have no image and width/height == 0.
2. We have no image and width/height != 0(as possible with your changes).

In both cases there is certainly some kind of issue, either image file is not specified or image can not be loaded for some reasons(missing file for example). These situations needs the user to react. So what is the better signal for trouble?

I have no only right answer here(and have no objection for your change). But I think it is not good to report any features(width/height) for the object that does not exist.

#7 Updated by Constantin Asofiei almost 9 years ago

Eugenie Lyzenko wrote:

Imagine two situations:
1. We have no image and width/height == 0.
2. We have no image and width/height != 0(as possible with your changes).

OK, but as I saw with DEFINE IMAGE, if a file is not specified, then a size phrase is required - so I don't think the image can end up with no size. Please test what happens with the image's WIDTH/HEIGHT-CHARS/PIXELS attributes in these cases (image or size phrase).

#8 Updated by Constantin Asofiei almost 9 years ago

Attached version was committed to bzr rev 10858 (just a header entry added to ImageGuiImpl, it was missing in 0510d.zip)

#9 Updated by Eugenie Lyzenko almost 9 years ago

Please test what happens with the image's WIDTH/HEIGHT-CHARS/PIXELS attributes in these cases (image or size phrase).

If no image file but size specified is not 0, 4GL consider this as "empty" image with given size. "empty" image means the space for image is allocating but no image is drawn.

#10 Updated by Constantin Asofiei almost 9 years ago

Eugenie, new question: are you sure the button's DEFAULT attribute needs to be checked in FrameGuiImpl.processDefaultButton? Because pressing ENTER in i widget invokes the button's trigger even if the button's DEFAULT attribute is false.

DEF BUTTON btn1.
DEF VAR i AS INT.

FORM i btn1 WITH FRAME f1 DEFAULT-BUTTON btn1.

ON 'choose':U OF btn1 IN FRAME f1
DO:
   MESSAGE "choose" btn1:DEFAULT IN FRAME f1.
   RETURN.
END.

UPDATE i btn1 WITH FRAME f1.

#11 Updated by Eugenie Lyzenko almost 9 years ago

Eugenie, new question: are you sure the button's DEFAULT attribute needs to be checked in FrameGuiImpl.processDefaultButton? Because pressing ENTER in i widget invokes the button's trigger even if the button's DEFAULT attribute is false.

Yes, I was sure it is the correct because according to Progress ABL Reference book page 1531-1532:

...
If the DEFAULT attribute is TRUE, the specified button is a default button. To make the specified button the default button for the frame, you must also set the frame’s DEFAULT-BUTTON attribute to the handle of the button.
...
To make the specified button the default button for the frame or dialog box, you must also set the button’s DEFAULT attribute to TRUE.
...

I think these quotations clearly declare this.

But with your test it works differently, button's DEFAULT attribute is silently ignoring. Looks like the Progress bug or documentation miss. So we have to decide what strategy we will take here.

#12 Updated by Greg Shah almost 9 years ago

Looks like the Progress bug or documentation miss. So we have to decide what strategy we will take here.

It doesn't matter what the documentation says. We have found the documentation to be very poor and often incorrect and/or incomplete. This behavior is something we must fix. It will take some additional testcases to confirm the relationship (if any) between the BUTTON:DEFAULT and FRAME DEFAULT-BUTTON option. I've created a new task for this: #2588.

#13 Updated by Constantin Asofiei almost 9 years ago

I've added the EDITOR changes (and some scroll-related changes from #2546 - rev 10880) to the 2563b branch (rev 10881). What it covers:
  • undo/redo on CTRL-Z
  • scrolling via keys/mouse
  • selection (added support for CTRL-SHIFT keys, too)
  • WORD-WRAP/RETURN-INSERTED/MAX-CHARS attributes
  • copy/paste/cut
  • navigation: page-up/down, ctrl-left/right, ctrl-home/end
  • special keys: ctrl-del (delete to end of line), ctrl-enter (can be used even if RETURN-INSERTED is false)

#14 Updated by Greg Shah almost 9 years ago

Code Review 2563b branch (rev 10881)

This is a really good update. I don't have any concerns.

#15 Updated by Constantin Asofiei almost 9 years ago

branch 2563b/rev 10882: Fixed javadoc errors. Added mouse-double-click support. Fixed scrolling by mouse and other caret-positioning problems.

No known issues at this point. One more round of testing to confirm that it passes and it's good to go (once Eugenie releases his scroll changes).

#16 Updated by Constantin Asofiei almost 9 years ago

branch 2563b/rev 10882 passed testing

#17 Updated by Constantin Asofiei almost 9 years ago

rebased branch 2563b, new revision is 10884

#18 Updated by Greg Shah almost 9 years ago

Code Review Task Branch 2563b revision 10884

I like the changes, nice improvement.

Hynek's changes will need to be merged. I know you are waiting on Eugenie's to pass and be checked in and then will merge those. My only question is whether you want to go before or after Igor's #2534 changes?

#19 Updated by Eugenie Lyzenko almost 9 years ago

Greg Shah wrote:

... I know you are waiting on Eugenie's to pass and be checked in and then will merge those...

I have already checked in and distributed the 0617b Scrollbar related update. It is required more actions from my side for Constantin to continue working? Are we changing the updates release schema? I just need to know what exactly I have to do to do everything in a right way.

#20 Updated by Greg Shah almost 9 years ago

I have already checked in and distributed the 0617b Scrollbar related update.

Right, sorry.

It is required more actions from my side for Constantin to continue working?

No.

Are we changing the updates release schema?

Yes, but you don't have to make any changes right now. We are testing a new process that uses branching instead of update zip files. In the next week or two we will roll it out to the entire company.

#21 Updated by Constantin Asofiei almost 9 years ago

Greg Shah wrote:

My only question is whether you want to go before or after Igor's #2534 changes?

I'd like to go after him, it will be easier to do the merge (as it affects the Editor classes).

#22 Updated by Constantin Asofiei almost 9 years ago

Rebased task branch 2563b from P2J trunk revision 10888 (new branch revision 10892).

#23 Updated by Constantin Asofiei almost 9 years ago

Rebased task branch 2563b from P2J trunk revision 10892 (new branch revision 10896).

#24 Updated by Constantin Asofiei almost 9 years ago

Rebased task branch 2563b from P2J trunk revision 10893 (new branch revision 10897).

#25 Updated by Constantin Asofiei almost 9 years ago

Rebased task branch 2563b from P2J trunk revision 10894 (new branch revision 10898).

#26 Updated by Constantin Asofiei almost 9 years ago

Rebased task branch 2563b from P2J trunk revision 10895 (new branch revision 10899).

There is a compile problem, need to change Igor's Editor.java change in #2534 (rev 10895) to work with the new impl.

#27 Updated by Constantin Asofiei almost 9 years ago

Please review task branch 2563b, revision 10903.

Revision 10901 is currently in runtime testing. Revisions 10902/10903 have only GUI changes.

#28 Updated by Greg Shah almost 9 years ago

Code Review Task Branch 2563b, Revision 10903

I'm fine with the changes. If it passes testing, please merge/commit to trunk.

#29 Updated by Constantin Asofiei almost 9 years ago

Please review task branch 2563b, revision 10907.

I'm running regression testing one more time, to clear some false negatives. I'll merge/commit to trunk once it finishes.

#30 Updated by Greg Shah almost 9 years ago

Code Review Task Branch 2563b, Revision 10907

I'm fine with the changes. If it passes testing, please merge/commit to trunk.

#31 Updated by Constantin Asofiei almost 9 years ago

Branch 2563b was merged to trunk as revno 10896 then it was archived.

#32 Updated by Greg Shah almost 9 years ago

  • Status changed from WIP to Closed

#33 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