Project

General

Profile

Bug #2491

SCREEN-VALUE returns a formatted value based on the widget's format string

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

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

0%

billable:
No
vendor_id:
GCD
case_num:

ges_upd20150115a.zip (133 KB) Greg Shah, 01/15/2015 09:20 PM

ges_upd20150116a.zip (133 KB) Greg Shah, 01/17/2015 06:18 AM

ges_upd20150117a.zip (133 KB) Greg Shah, 01/17/2015 08:15 AM

History

#1 Updated by Greg Shah over 9 years ago

It turns out that our SCREEN-VALUE implementation was nearly completely broken. MAJIC only uses a small number of cases and we had patched the old implementation enough to get it working. But the case of honoring widget format strings in screen-value output was badly broken.

Please see testcases/uast/screen_value/screen_value_*is_formatted.p for examples. With the attached update, all cases work except for 1 pretty extreme and rare quirk (see the note after case 3 in screen_value_with_at_base_field.p).

This also contains a fix for date display format parsing, which was needed to execute the date related testcase. This removes a severe parsing limitation that was previously there.

Constantin: please review this. I'll start regression testing shortly.

#2 Updated by Constantin Asofiei over 9 years ago

Greg, I recall that SCREEN-VALUE was problematic in the widget validation expressions, too. It can be postponed if this is not needed for current work, but it's worth a check.

Otherwise, I'm OK with the update.

#3 Updated by Greg Shah over 9 years ago

The DateFormat class needed more changes to properly match the original behavior. With the attached changes, this update passed main-regression testing. CTRL-C testing is running now.

#4 Updated by Greg Shah over 9 years ago

In regard to the use of screen-value in validation expressions, at least the basic functionality works as expected with my changes.

See testcases/uast/screen_value/screen_value_in_validation_expression.p:

def var num as int  format "999".

update num validate((integer(num:screen-value) >= 1 and integer(num:screen-value) <= 30),
                                  "num must be between 1 and 30, inclusive!").                               

Can you think of any other validation case that I should check?

#5 Updated by Greg Shah over 9 years ago

CTRL-C tests passed (without any failures, including the 3-way ones). The attached version is checked in as bzr rev 10714.

The only difference is that I added a missing history entry in ToggleBoxWidget.

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