Project

General

Profile

Feature #2612

Feature #2252: implement GUI client support

implement GUI conversion and runtime support for the SLIDER widget

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

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

100%

billable:
No
vendor_id:
GCD
version_reported:
version_resolved:

slider_test0_4gl_chui.jpg - Horizontal slider ChUI (54.7 KB) Eugenie Lyzenko, 09/21/2015 04:45 PM

slider_test01_4gl_chui.jpg - Vertical slider ChUI (54.6 KB) Eugenie Lyzenko, 09/21/2015 04:45 PM

slider_test01_4gl_gui_xy.jpg - Screen slider_test01.p 4gl (50.4 KB) Eugenie Lyzenko, 01/28/2016 09:37 AM

slider_test02_4gl_gui_xy.jpg - Screen slider_test02.p 4gl (54.3 KB) Eugenie Lyzenko, 01/28/2016 09:37 AM

slider_test03_4gl_gui_xy.jpg - Screen slider_test03.p 4gl (52.3 KB) Eugenie Lyzenko, 01/28/2016 09:37 AM

slider_test01_p2j_gui_20160128.jpg - First p2j slider screen (38.1 KB) Eugenie Lyzenko, 01/28/2016 07:38 PM

slider_test05_p2j_gui_20160129.jpg - Vertical slider on 3D frame demo (46.8 KB) Eugenie Lyzenko, 01/29/2016 08:01 PM

slider_test21_p2j_gui_20160129.jpg - Slider with tic marks on top demo (37.5 KB) Eugenie Lyzenko, 01/29/2016 08:01 PM

slider_pointers_4gl_gui.jpg - Slider thumb/pointer (5.89 KB) Eugenie Lyzenko, 02/03/2016 10:32 AM

slider_test04_p2j_gui_20160203.jpg - Test 04 with thumb (47.1 KB) Eugenie Lyzenko, 02/03/2016 08:04 PM

slider_test05_p2j_gui_20160203.jpg - Test 05 with thumb (46.9 KB) Eugenie Lyzenko, 02/03/2016 08:04 PM

slider_test21_1_p2j_gui_20160203.jpg - Test 21_1 with thumb (42.6 KB) Eugenie Lyzenko, 02/03/2016 08:04 PM

slider_test21_p2j_gui_20160203.jpg - Test 21 with thumb (42.1 KB) Eugenie Lyzenko, 02/03/2016 08:04 PM

slider_test213_p2j_20160205.jpg - slider_test21_3.p in P2J as of 20160205 (42.9 KB) Eugenie Lyzenko, 02/05/2016 09:48 PM

slider_test215_p2j_20160205.jpg - slider_test21_5.p in P2J as of 20160205 (42.9 KB) Eugenie Lyzenko, 02/05/2016 09:48 PM

slider_test04_p2j_20160208.jpg - Test 04 as of 20160208 (50.4 KB) Eugenie Lyzenko, 02/08/2016 07:38 PM

slider_test021_p2j_20160208.jpg - Test 02_1 as of 20160208 (42 KB) Eugenie Lyzenko, 02/08/2016 07:38 PM

slider_test210_p2j_20160208.jpg - Test 21_0 as of 20160208 (43.1 KB) Eugenie Lyzenko, 02/08/2016 07:38 PM

slider_test212_p2j_20160208.jpg - Test 21_2 as of 20160208 (43 KB) Eugenie Lyzenko, 02/08/2016 07:38 PM

slider_test215_p2j_20160208.jpg - Test 21_5 as of 20160208 (47 KB) Eugenie Lyzenko, 02/08/2016 07:38 PM

slider_test217_p2j_20160208.jpg - Test 21_7 as of 20160208 (47 KB) Eugenie Lyzenko, 02/08/2016 07:38 PM

slider_test2110_p2j_20160208.jpg - Test 21_10 as of 20160208 (48.1 KB) Eugenie Lyzenko, 02/08/2016 07:38 PM

slider_test210_p2j_20160209.jpg - P2J test slider_test21_0.p as of 20160209 (43.5 KB) Eugenie Lyzenko, 02/09/2016 08:36 PM

slider_test217_p2j_20160209.jpg - P2J test slider_test21_7.p as of 20160209 (43.2 KB) Eugenie Lyzenko, 02/09/2016 08:36 PM

slider_test5_4gl_0_gui.jpg - NO-CURRENT-VALUE set for slider (61.1 KB) Eugenie Lyzenko, 02/10/2016 05:54 PM

slider_test5_2_4gl_0_gui.jpg - NO-CURRENT-VALUE == TRUE for slider (60.1 KB) Eugenie Lyzenko, 02/10/2016 05:54 PM

slider_test51_p2j_20160210.jpg - NO-CURRENT-VALUE test slider_test5_1.p, P2J (48.7 KB) Eugenie Lyzenko, 02/10/2016 08:27 PM

slider_test52_p2j_20160210.jpg - NO-CURRENT-VALUE test slider_test5_2.p, P2J (48.9 KB) Eugenie Lyzenko, 02/10/2016 08:27 PM

slider_test61_p2j_20160210.jpg - LARGE-TO-SMALL test slider_test6_1.p, P2J (44.8 KB) Eugenie Lyzenko, 02/10/2016 08:27 PM

slider_test63_p2j_20160210.jpg - LARGE-TO-SMALL test slider_test6_3.p, P2J (44.7 KB) Eugenie Lyzenko, 02/10/2016 08:27 PM

slider_test3_p2j_gui_dynamic_20160211.jpg - P2J dynamic slider widget test demo (35.8 KB) Eugenie Lyzenko, 02/11/2016 01:22 PM

slider_test210_p2j_web_20160211.jpg - P2J web client slider demo (86.9 KB) Eugenie Lyzenko, 02/11/2016 07:21 PM


Related issues

Related to User Interface - Feature #3000: implement the SLIDER widget in ChUI New

History

#1 Updated by Greg Shah almost 9 years ago

This task is for full implementation of the GUI widget implementation for SLIDER. Both static and dynamic usage is needed.

Make sure that the common widget options, attributes and methods are supported in the runtime code.

Please include both conversion and runtime support for these attributes/options:

Required:
HORIZONTAL, VERTICAL (only possible as an option, probably is the same as HORIZONTAL == NO)

Nice to have:
LARGE-TO-SMALL
NO-CURRENT-VALUE
MAX-VALUE
MIN-VALUE
TICK-MARKS
FREQUENCY

#2 Updated by Eugenie Lyzenko almost 9 years ago

Created task branch 2612a from trunk revision 10935.

#3 Updated by Eugenie Lyzenko almost 9 years ago

The question. Do we need the support for slider widget in ChUI? I'm asking because some client code can be common for ChUI and GUI and it is better to have the common code in standalone classes I guess.

#4 Updated by Eugenie Lyzenko almost 9 years ago

Task branch 2612a for review updated to revision 10936.

This update adds first steps for SLIDER widget conversion support. With this change the slider widget is properly generating. The supported attributes(conversion level, converted code is able to be compiled) for now are:
HORIZONTAL, VERTICAL(which is not actual attribute but VIEW-AS option for SLIDER widget), MAX-VALUE, MIN-VALUE.

#5 Updated by Greg Shah almost 9 years ago

As far as I understand it, slider is a GUI-only widget.

Please test to confirm this.

#6 Updated by Eugenie Lyzenko almost 9 years ago

Greg Shah wrote:

As far as I understand it, slider is a GUI-only widget.

Please test to confirm this.

Looks like the slider is working in ChUI too. See the pictures attached.

#7 Updated by Greg Shah almost 9 years ago

OK. I'm glad you tested it.

Does the ChUI version work with the keyboard/focus or does it require mouse support?

#8 Updated by Eugenie Lyzenko almost 9 years ago

Does the ChUI version work with the keyboard/focus or does it require mouse support?

In ChUI mode it works with keyboard(to change the value) and handles the focus gain/lost by focus change key. No mouse required.

#9 Updated by Eugenie Lyzenko almost 9 years ago

Rebased task branch 2612a from P2J trunk revision 10937, new branch revision is 10938.

#10 Updated by Eugenie Lyzenko almost 9 years ago

Task branch 2612a for review updated to revision 10939.

The update adds conversion base support for planned attributes:
LARGE-TO-SMALL, NO-CURRENT-VALUE, MAX-VALUE, MIN-VALUE, TICK-MARKS, FREQUENCY. Need to write testcases to verify all getters/setters are working properly and check if the dynamic case is working as well.

#11 Updated by Greg Shah almost 9 years ago

Do we need the support for slider widget in ChUI? I'm asking because some client code can be common for ChUI and GUI and it is better to have the common code in standalone classes I guess.

We now have an answer to your original question. Yes, when it is time to implement the client-side runtime support, please use a common widget approach with ChUI and GUI subclasses.

#12 Updated by Eugenie Lyzenko almost 9 years ago

Greg Shah wrote:

We now have an answer to your original question. Yes, when it is time to implement the client-side runtime support, please use a common widget approach with ChUI and GUI subclasses.

OK.

#13 Updated by Eugenie Lyzenko almost 9 years ago

Task branch 2612a for review updated to revision 10940.

This update completes conversion support for slider widget for all mentioned attributes. The next step is to resolve possible review notes, rebase with the recent trunk and test for Java 8 compatibility.

And if there are no notes/issues I guess we can put this into regression testing.

#14 Updated by Greg Shah almost 9 years ago

Code Review Task Branch 2612a Revision 10940

This is very good. Some minor thoughts:

1. In the SliderInterface, do we need setMinValue(int64) when we have setMinValue(NumberType) (int64 is a NumberType)? The same is true for setMaxValue(int64).

2. In the SliderInterface, shouldn't we implement setMinValue(double) instead of setMinValue(int)? The same is true for setMaxValue(int) and setFrequency(int).

3. HandleCommon is missing SliderInterface.

#15 Updated by Greg Shah almost 9 years ago

Please rebase, fix these issues and I'll do a final code review. Then it should go into testing. It can go next.

#16 Updated by Eugenie Lyzenko almost 9 years ago

Greg Shah wrote:

Code Review Task Branch 2612a Revision 10940
2. In the SliderInterface, shouldn't we implement setMinValue(double) instead of setMinValue(int)? The same is true for setMaxValue(int) and setFrequency(int).

The MIN/MAX-VALUE are INTEGER, not DECIMAL. I thought this should map to the int internally. It is not correct?

#17 Updated by Greg Shah almost 9 years ago

The MIN/MAX-VALUE are INTEGER, not DECIMAL. I thought this should map to the int internally. It is not correct?

It depends.

1. Can you set these values using an INT64?
2. Can you set these values using a DECIMAL?

If so then the setters need to accept the types that are possible (and then cast/truncate as needed). The getter probably does need to return an INTEGER if that is what the 4GL does. If so, then internally storing as an int is good.

#18 Updated by Eugenie Lyzenko almost 9 years ago

Rebased task branch 2612a from P2J trunk revision 10938, updated to revision 10942.

The update resolves the notes, fixes the javadoc errors. And we do not need set(Min|Max)Value(int64). Also the MIN/MAX attributes does not accept INT64 and DECIMAL. Moreover it is not possible to change attributes after realization. So I think int is OK as internal data storage.

Other attributes were checked too.

#19 Updated by Greg Shah almost 9 years ago

Code Review Task Branch 2612a Revision 10942

I'm good with the changes. Please put it through conversion regression testing. If it passes, you may merge it to trunk.

You don't need to do runtime regression testing.

#20 Updated by Eugenie Lyzenko almost 9 years ago

Greg Shah wrote:

Code Review Task Branch 2612a Revision 10942

I'm good with the changes. Please put it through conversion regression testing. If it passes, you may merge it to trunk.

You don't need to do runtime regression testing.

OK. Testing is in progress.

#21 Updated by Eugenie Lyzenko almost 9 years ago

The conversion testing is completed. Generated sources are identical, starting merge into trunk.

#22 Updated by Eugenie Lyzenko almost 9 years ago

Branch 2612a was merged to trunk as revno 10939. Archived.

#23 Updated by Eugenie Lyzenko almost 9 years ago

The slider widget testcases have been added to bzr repo(revision 1344).

#24 Updated by Eugenie Lyzenko over 8 years ago

Created task branch 2612b from trunk revision 10962.

#25 Updated by Eugenie Lyzenko over 8 years ago

Rebased task branch 2612b from P2J trunk revision 10965, still no changes from trunk.

#26 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10966.

This is the fix for conversion support of the dynamic slider attribute setting. The interface mane should be truncated to have no "Interface" suffix to properly generate data wrapper method.

#27 Updated by Eugenie Lyzenko over 8 years ago

Rebased task branch 2612b from P2J trunk revision 10966, new branch revision is 10967.

#28 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10968.

This is the preparation steps to have GUI implementation. The SliderWidget and SliderCOnfig bases are changed to BaseEntity and BaseConfig respectively to have more features that can be demanded in runtime implementation. The SliderConfig is added to config manager classes to create the instance. Making the preparation to support dynamic widget. On the client side the changes made to be able to reconstruct widget and implement UI independent and GUI specific features. The ChUI mode is still postponed to the moment when it will be required. The GUI mode now has only placeholders to get compiled and verify the logic is OK. Continue with GUI implementation. Looks like we need to make SVG image for slider thumb.

#29 Updated by Eugenie Lyzenko over 8 years ago

Adding slider test screens in 4GL. The SIZE option is not specified, only min/max. Investigating how the default size is calculating in GUI mode in 4GL.

The used testcases: slider_test01.p, slider_test02.p, slider_test03.p from recently updated testcases brz(1460).

#30 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10969.

Added some GUI rendering implementations for dotted frame, rule and current value. The pointer painting is now implemented as simple line, will be replaced with image based approach further. The slider widget superclass is changed to ControlEntity. The current screen for horizontal slider is attached.

The next issue is to bind the screen representation to the integer variable the slider reflects. And adding mouse/keyboard handling with reaction to the base variable. Continue working.

#31 Updated by Greg Shah over 8 years ago

Cool!

#32 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10970.

Also the testcases repo updated to revision 1463 with recent slider demos.

This update has some GUI fixes, enable/disable option support, starting tic marks implementation. Also the keyboard changing for slider value has been added and complete support for widget label draw. Mouse support is under investigation. Some test scpeenshots have been attached here to illustrate.

#33 Updated by Eugenie Lyzenko over 8 years ago

Rebased task branch 2612b from P2J trunk revision 10967, new revision 10971.

#34 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10972.

Adding mouse handling base. Preparing to rebase for 10969 trunk. Working on handling mouse drag event. The source still has the commented experimental code and some debug calls.

#35 Updated by Eugenie Lyzenko over 8 years ago

Rebased task branch 2612b from P2J trunk revision 10969, new revision 10974.

#36 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10975.

Adding support for moving slider pointer by mouse drag. The next step will be to implement the different slider pointers via vector SVG images. There can be 7 different pointers: down, right for no tic marks mode, up, down, left, right, both for tic marks enabled mode. All of them has different sizes and shapes so we need separated images for each one, however one of them can be drawn without bitmap(tic mark enabled BOTH mode).

#37 Updated by Greg Shah over 8 years ago

Please see #2565 (and branch 2565a) for our current work on mouse pointer support. Please review that branch and make sure you don't duplicate any work already done there.

#38 Updated by Eugenie Lyzenko over 8 years ago

Greg Shah wrote:

Please see #2565 (and branch 2565a) for our current work on mouse pointer support. Please review that branch and make sure you don't duplicate any work already done there.

OK. But this is not exactly related to slider "pointer". The slider "pointer" is like the thumb for scrollbar, may be not a good word to identify the object, I just do not know the better one.

#39 Updated by Greg Shah over 8 years ago

If the mouse pointer doesn't change, then #2565 is not related.

#40 Updated by Eugenie Lyzenko over 8 years ago

Greg Shah wrote:

If the mouse pointer doesn't change, then #2565 is not related.

No, the mouse pointer remains unchanged. I mean the objects on the attached picture. What do you think is the correct word to identify them?

#41 Updated by Greg Shah over 8 years ago

I think it is best called the "thumb".

#42 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10976.

Adding code to draw the thumb shapes using SVG images and SVG images itself. The vector images are need to be refined to display exactly the same as in 4GL. Also need to debug tic marks drawing and other GUI painting. The samples to demonstrate the current status are attached here.

#43 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10977.

This is rework for all thumb images to exactly match the pictures taken from 4gl and small logic fix to display vertical tick marks. The most of the time today was spent for the finding the SVG drawing that can give the expected results. Because if we just make 1:1 vector - the final converted bitmap will not match the 4gl. So there are many artifacts while using SVG image as source for controls. So the current SVG images looks unusual or a bit ugly while opening in inkskape. But the P2J picture is OK. This is the reason I prefer to work with pure bitmaps.

Continue working on slider widget. Need to verify other GUI widget parts for correct calculations and drawing.

#44 Updated by Eugenie Lyzenko over 8 years ago

Slider testcases updated in bzr to revision 1465.

#45 Updated by Eugenie Lyzenko over 8 years ago

Rebased task branch 2612b from P2J trunk revision 10970, new revision is 10978.

#46 Updated by Eugenie Lyzenko over 8 years ago

The work for slider elements adjustment to completely fit the 4gl is in progress. Some intermediate results can be seen on the pictures attached. Bottom and right modes are completely done in static parts.

#47 Updated by Greg Shah over 8 years ago

This is all coming along nicely. My only comment is that the colors/shading of the edges of the SVG thumbs does not match the 4GL examples shown in note 40.

#48 Updated by Eugenie Lyzenko over 8 years ago

Greg Shah wrote:

This is all coming along nicely. My only comment is that the colors/shading of the edges of the SVG thumbs does not match the 4GL examples shown in note 40.

Yes, you are right, the pointers from #40 does not match the pictures. Just because they are different ones. It is possible to have 8 different thumb types(depending on tic mark option: top/bottom/right/left/both vertical/both horizontal/none vertical/none horizontal), each of which has different colors/shading. We have to consider each one separately. Working on it. #40 and #46 just does not have the same thumb to compare(I have complete set for 4GL to reproduce in P2J).

#49 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10979.

The update has fixes to draw slider for every mode. The result can be seen on the pictures attached. The remaining drawing issue is the tic marks drawing, particularly the position(or distance between tics) of the every tic. There are some non-trivial algorithm is used to do this in 4GL. For example the distance between tics is not always the constant. There s additional possible gap in a middle of the scale. Need to investigate and reproduce.

#50 Updated by Greg Shah over 8 years ago

This is good headway! It looks like you are very close.

#51 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10980.

The update implements the tic marks calculation compatible with one we have in 4GL. Also many code cleanups, improvements, separation common code into standalone procedure to simplify code maintain and clarify approach is used during implementation. The remaining point here is to check the current value display position. The slider has good working condition, reacting to keyboard and mouse and able to get the changed screen value.

Simple screenshots for today status are attached here.

The testcases bzr repo has also been updated to the version 1466.

The next steps to do:
- Verify the widget's current value is properly displayed in a right position
- Verify the widget size calculation is performed properly in chars and pixels. To return to the layout manager.
- Implement LARGE-TO-SMALL, NO-CURRENT-VALUE attributes support.

The question: Do we currently need the ChUI specific support for slider widget? Or only GUI usage is assumed to have now?

#52 Updated by Eugenie Lyzenko over 8 years ago

Interesting finding about usage of the NO-CURRENT-VALUE attribute option. According to the Progress documentation this attribute allows to control whether the current value must be displayed or not. If defining NO-CURRENT-VALUE in slider definition the current value will not be displayed. However take a look at the pictures attached. In the case when there is no current value on the screen the attribute logical value is NO. On the other hand if not to specify option the default value is YES.

This is a bit confusing if to consider the attribute as logical:
NO-CURRENT-VALUE YES/TRUE - means display the current value
NO-CURRENT-VALUE NO/FALSE - means NOT display the current value

Need to change widget logic accordingly.

#53 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10981.

The update has changes that fixes the current value coordinate relative to main slider body. Also the size was verified to return proper values for layout manager. And implementation for LARGE-TO-SMALL, NO-CURRENT-VALUE attributes support.

The screen-shots to demonstrate LARGE-TO-SMALL and NO-CURRENT-VALUE in current P2J are attached here. The test bzr repo updated to revision 1467 with recent slider related tests.

The only points that I want to debug/implement before considering slider as commit candidate(if we do not need the ChUI version) are:
- verify the supported attributes change works the same as in 4GL. Not all attributes can be changed after realization
- check for dynamic widget is properly working

#54 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10982.

The screenshot for dynamic widget in P2J is attached.

Verified attributes set and adding dynamic widget support. So I think the current state can be considered as release candidate to put into regression testing if there are no objections.

The ChUI mode is not implemented for now.

#55 Updated by Eugenie Lyzenko over 8 years ago

Some mote testing for GUI slider:
1. The web client works fine, see the attached file for sample.

2. There is one thing I've missed at this time. The internal variable(integer type) used as the base for slider widget is not refreshing properly in P2J. In 4GL it is not usually used, code is working with slider's screen value. But if execute ASSIGN sl for integer sl viewed as slider the screen value and variable value become in sync. Currently it is not implemented in 4GL. Going to fix it before testing slider and commit if there are no objection. The respective testcase slider_test7.p has been added to test bzr repo(rev 1468).

#56 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10983, 10984.

Added missed ASSIGN statement support. Now the base integer variable is properly updating.

Also I've made the change looking strange, so need your comments. I have found in 4GL when the slider value is changing the change trigger is calling twice. It looks like a bug. So the question: do we need to simulate this behavior? In this update I have added the code to reproduce 4GL reaction. But if it is not required - let me know and I remove additional call.

So the code is now ready to be tested and commit as working GUI slider widget. Waiting for the confirmation to start testing(we need the conversion test too because the rule file was changed).

#57 Updated by Eugenie Lyzenko over 8 years ago

Rebased task branch 2612b from P2J trunk revision 10971, new revision is 10985.

#58 Updated by Greg Shah over 8 years ago

Also I've made the change looking strange, so need your comments. I have found in 4GL when the slider value is changing the change trigger is calling twice. It looks like a bug. So the question: do we need to simulate this behavior? In this update I have added the code to reproduce 4GL reaction. But if it is not required - let me know and I remove additional call.

What testcases shows this behavior?

#59 Updated by Eugenie Lyzenko over 8 years ago

Greg Shah wrote:

What testcases shows this behavior?

Every test in uast/slider/ directory. In all of them the on value-changed of Sl trigger is listening.

#60 Updated by Greg Shah over 8 years ago

Code Review Task Branch 2612b Revision 10985

This is great work!

1. Please add comments to the javadoc for both versions of SliderWidget,setNoCurrentValue(). As you mention in note 52, the 4GL behavior is very confusing. So it is important to explain this in the javadoc so that it explains how the logic is "reversed" from what would be expected AND that this reversal matches the 4GL behavior.

2. Can you use an int64 or decimal with a slider?

3. Can PAGE_UP/PAGE_DOWN/HOME/END keys be used with a slider?

#61 Updated by Eugenie Lyzenko over 8 years ago

1. Please add comments to the javadoc for both versions of SliderWidget,setNoCurrentValue(). As you mention in note 52, the 4GL behavior is very confusing. So it is important to explain this in the javadoc so that it explains how the logic is "reversed" from what would be expected AND that this reversal matches the 4GL behavior.

OK. I'll add in a next branch revision shortly.

2. Can you use an int64 or decimal with a slider?

The only data is possible to use with slider is INTEGER.

3. Can PAGE_UP/PAGE_DOWN/HOME/END keys be used with a slider?

Yes, these keys are valid for slider, I've missed to check them. The reaction is also not obvious.
For horizontal:
HOME - move to the left edge,
END - move to the right edge
PAGE_DOWN - 4 values steps to the right
PAGE_UP - 4 values steps to the left

For vertical:
HOME - move to the top edge,
END - move to the bottom edge
PAGE_DOWN - 4 values steps up
PAGE_UP - 4 values steps down

The strange thing is it is not dependent on the LARGE-TO-SMALL option. The pressing HOME not always mean setting slider value to MIN-VALUE and pressing PAGE_DOWN not always decrease the slider value.

I'll implement this in a next branch update later today.

#62 Updated by Greg Shah over 8 years ago

Guy: Eugenie's slider testcases exhibit a strange behavior in GUI. Consider this code:

message "Hit a key to start".
pause.

/** Define widgets **/
define variable Sl as integer initial 5
    view-as slider max-value 25 min-value 1 horizontal.
/* define variable Stat as logical. */
define variable SlValue as character.

define button ExitButton label "Exit".

/* Define frames */
define frame f0
   Sl ExitButton
with side-labels size-chars 40 by 22 centered title "Slider, horizonlal test #01".

/* Trigger definitions */

on value-changed of Sl
   do:
      SlValue = Sl:screen-value.
      message "The value changed to: " SlValue.
   end.

enable all with frame f0.

message "Width in pixels: " Sl:width-pixels ", in chars: " Sl:width-chars.
message "Height in pixels: " Sl:height-pixels ", in chars: " Sl:height-chars.

wait-for choose of ExitButton.

When run in GUI, the trigger executes twice for each value change. This occurs when the user changes the value by either keys or mouse.

Interestingly, when run in ChUI, the trigger only executes once per value change.

Can you see anything in the testcases that might cause this or is this just a strange "feature" of the 4GL GUI?

#63 Updated by Greg Shah over 8 years ago

2. Can you use an int64 or decimal with a slider?

The only data is possible to use with slider is INTEGER.

Changing the Sl variable in slider_test01.p to int64 works without any problem in ChUI. I didn't test in GUI, but I would expect it to work fine.

#64 Updated by Eugenie Lyzenko over 8 years ago

The only data is possible to use with slider is INTEGER.

Changing the Sl variable in slider_test01.p to int64 works without any problem in ChUI. I didn't test in GUI, but I would expect it to work fine.

Yes, it is true. I've double checked the previous notes(which I used to conclusion above). The MIN/MAX attribute values are INTEGER, not the slider value itself. Need to fix this.

But the question: even if we can initially assign the big enough value the screen value can be from MIN to MAX - when the screen value commit back to variable it can not be outside the INTEGER range. Some confusing point?

#65 Updated by Greg Shah over 8 years ago

But the question: even if we can initially assign the big enough value the screen value can be from MIN to MAX - when the screen value commit back to variable it can not be outside the INTEGER range. Some confusing point?

Just make sure our error handling is the same as the 4GL. For example, if they raise and error, so should we.

#66 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10986.

Notes resolution for point 1 and 3 from #60 note. The handling of the INT64 is in progress.

#67 Updated by Eugenie Lyzenko over 8 years ago

Task branch 2612b for review updated to revision 10987.

Added support for INT64 internal slider variable. Screen value remains int. The respective testcases uploaded in bzr revision 1469.

#68 Updated by Greg Shah over 8 years ago

Code Review Task Branch 2612b Revision 10987

I'm fine with the changes. Please put them through regression testing.

#69 Updated by Eugenie Lyzenko over 8 years ago

Greg Shah wrote:

Code Review Task Branch 2612b Revision 10987

I'm fine with the changes. Please put them through regression testing.

OK. Starting with conversion testing.

#70 Updated by Eugenie Lyzenko over 8 years ago

The conversion testing completed, generated codes are identical. Continue with runtime testing.

#71 Updated by Eugenie Lyzenko over 8 years ago

The main part completed without regressions. Running CTRL-C one.

#72 Updated by Greg Shah over 8 years ago

If CTRL-C testing passes, please go ahead and merge 2612b to trunk.

#73 Updated by Eugenie Lyzenko over 8 years ago

Greg Shah wrote:

If CTRL-C testing passes, please go ahead and merge 2612b to trunk.

OK. The testing completed, no regression, had to run CTRL-C 3 way tests in a separate session.

Starting the merge action.

#74 Updated by Eugenie Lyzenko over 8 years ago

The results are in 2612b_10987_2791e7a_20160217_evl.zip.

#75 Updated by Eugenie Lyzenko over 8 years ago

Branch 2612b was merged to trunk as revno 10972 then it was archived.

#76 Updated by Greg Shah over 8 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

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