Bug #2452
Feature #2252: implement GUI client support
Feature #2446: implement BUTTON and IMAGE GUI widgets (runtime and conversion support)
Button label resize fails with error 4054
0%
History
#1 Updated by Hynek Cihlar over 9 years ago
def button b0. def frame f b0. ENABLE ALL WITH FRAME f. b0:label = "resize".
The above code sample causes error "**Unable to set SCREEN-VALUE. LITERAL widget does not fit in FRAME. (4054)" in P2J, but in 4GL works fine.
#2 Updated by Greg Shah over 9 years ago
- Assignee set to Eugenie Lyzenko
- Start date deleted (
11/27/2014)
#3 Updated by Greg Shah over 9 years ago
- Parent task set to #2446
#4 Updated by Eugenie Lyzenko about 9 years ago
Hynek, I need your comments.
... +----+ |<re>| +----+ ... ** New width for BUTTON b0 is too large to fit in frame. (4475) Procedure complete. Press space bar to continue. ...
This is the 4GL character mode output(both Linux and Windows) for the testcase you have provided. The same message I have in Windows GUI mode(in warning dialog). Have you seen this? What do you mean telling "in 4GL works fine"?
#5 Updated by Hynek Cihlar about 9 years ago
Indeed, the original description doesn't seem to be correct. Still there are differences between 4GL and P2J - 4GL gives the message "** New width for BUTTON b0 is too large to fit in frame. (4475)" vs. P2J resizes the frame to fit the new label.
Eugenie, I suggest you wait with this until I finish my in-progress changes. I am modifying some of the related widget fields and logic and we would likely get conflicts.
#6 Updated by Eugenie Lyzenko about 9 years ago
Hynek Cihlar wrote:
Indeed, the original description doesn't seem to be correct. Still there are differences between 4GL and P2J - 4GL gives the message "** New width for BUTTON b0 is too large to fit in frame. (4475)" vs. P2J resizes the frame to fit the new label.
Yes, it is exactly what I see in my tests too.
Eugenie, I suggest you wait with this until I finish my in-progress changes. I am modifying some of the related widget fields and logic and we would likely get conflicts.
OK. How much time do you expect it can take?
#7 Updated by Hynek Cihlar about 9 years ago
Eugenie Lyzenko wrote:
Eugenie, I suggest you wait with this until I finish my in-progress changes. I am modifying some of the related widget fields and logic and we would likely get conflicts.
OK. How much time do you expect it can take?
I expect to have it released Monday or Tuesday.
#8 Updated by Hynek Cihlar about 9 years ago
Eugenie, I'm bit delayed. I am expecting the work to be finished sometime at the end of the week.
#9 Updated by Greg Shah almost 9 years ago
This task can be worked on now.
#10 Updated by Eugenie Lyzenko almost 9 years ago
Greg Shah wrote:
This task can be worked on now.
OK. Soon I will have the fix. Can I include it into update pending to be tested and related to prepackaged button images?
#11 Updated by Greg Shah almost 9 years ago
Yes, it is a good idea to include it in the #2545 update.
#12 Updated by Eugenie Lyzenko almost 9 years ago
- File evl_upd20150429b.zip added
This update for review has fix for button resizing. I have modified ButtonWidget
class adding override for GenericWidget.setLabel(String)
where the label is set for all widgets to avoid additional class casting and instanceof
checking to have the code more clear.
#13 Updated by Greg Shah almost 9 years ago
Code Review evl_upd20150429b.zip
Does the 4GL remove the &
characters from the label before it calculates that the label is too big to fit? See GenericWidget.setLabel(String)
which does the removal. That code is called after the ButtonWidget.setLabel(String)
has already generated an error. I just want to make sure we are compatible.
Hynek: are you OK with the ButtonWidget.setLabel(String)
code?
#14 Updated by Eugenie Lyzenko almost 9 years ago
- File evl_upd20150429c.zip added
Does the 4GL remove the & characters from the label before it calculates that the label is too big to fit? See
GenericWidget.setLabel(String)
which does the removal. That code is called after theButtonWidget.setLabel(String)
has already generated an error. I just want to make sure we are compatible.
Yes, you are right, the progress removes &
before truncating the label. The attached update resolve this issue.
#15 Updated by Greg Shah almost 9 years ago
Code Review evl_upd20150429c.zip
I like your original idea of avoiding more type checking in GenericWidget.setLabel()
, but we already have other references to ButtonWidget
and ToggleBoxWidget
there.
I guess your solution is OK for now. Eventually we should provide protected methods in GenericWidget
that would allow sub-classes to override the default behavior and thus move the button/toggle-box specific logic into those classes.
Please add a TODO in that method to explain this so that we can "remember" it easily.
#16 Updated by Eugenie Lyzenko almost 9 years ago
- File evl_upd20150429d.zip added
Greg Shah wrote:
Please add a TODO in that method to explain this so that we can "remember" it easily.
Adding TODO
note to the GenericWidget.setLabel()
change.
#17 Updated by Greg Shah almost 9 years ago
Code Review evl_upd20150429d.zip
It is good.
Hynek: any concerns?
#18 Updated by Hynek Cihlar almost 9 years ago
GenericWidget.setLabel()
is becoming a little overblown. It should be split into several parts - label validation, label value transformation (removal of '&' for example) and calculation. These parts could be abstracted and so the casting in the parent class avoided.
#19 Updated by Hynek Cihlar almost 9 years ago
Greg Shah wrote:
Code Review evl_upd20150429d.zip
It is good.
Hynek: any concerns?
I think it is good, I didn't spot any issues in the drawing code. I would maybe inline LogicalTerminal.isButtonOrImage
and LogicalTerminal.isButton
- matter of personal taste.
#20 Updated by Greg Shah almost 9 years ago
OK, let's go with this as is for now.
Pause testing on this until Constantin's changes are checked in. Then merge and regression test.
#21 Updated by Eugenie Lyzenko almost 9 years ago
- File evl_upd20150429e.zip added
OK, let's go with this as is for now.
Before I've got this message I prepared one more improved version of the same functionality with moving the real worker to the ButtonWidget
. Sorry, too many stages.
Pause testing on this until Constantin's changes are checked in. Then merge and regression test.
OK.
#22 Updated by Greg Shah almost 9 years ago
Code Review evl_upd20150429e.zip
I like it!
#23 Updated by Eugenie Lyzenko almost 9 years ago
The fix for this issue is included into update for task #2545 for commit and distribute, evl_upd20150503a.zip
. Passed the runtime regression testing.
#24 Updated by Greg Shah almost 9 years ago
- Target version set to Milestone 12
- Status changed from New to Closed
#25 Updated by Greg Shah over 7 years ago
- Target version changed from Milestone 12 to GUI Support for a Complex ADM2 App