-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some issues found in the Test Module #5738
Fix some issues found in the Test Module #5738
Conversation
boutinb
commented
Nov 20, 2024
•
edited
Loading
edited
- In Test Variable Encoding, Simple Variables Form Section, set some variables so that the dropdown gets some values. Duplicate the analysis: error telling that an option cannot be set. The isJsonValid function of the ComboBox control was not up-to-date, and should allow object Json value.
- In Test Variable Encoding, if you drag & drop 2 variables in an Interaction VariablesList, it adds automatically the interaction term. If there is an allowed type, the terms should get automatically this type even if they have another type. This does not work for the interaction term: in the result, we can still see that it keeps the original types.
- In Test Sources with special attributes analysis, in the source with levels section. If you set a nominal/ordinal variable, you see the levels of the variable in the dropdown. If you duplicate the analysis, it loses these values. This is due to the fact that when the values of a dropdown is directly set to the levels of another control, there is here no way to know the dependency of the controls between them: during the initialization of the form, the Dropdown can get its value before the Variable list (it actually depends on), and as the binding value is not a possible value of the dropdown, it loses. For this a special if the binding value does not correspond of the possible values, this value is kept in the _lostValue member. In case that the possible values of the dropdown change (because the Variables list is finally set, the dropdown checks whether the _lostValue could fit. This must be done only before the form is completely initialized.
- Add textFormat propery to controls. A Test Format analysis is also added in the Test Module.
Im guessing the name of lostValue should be lastValue and also you need to manually rebase this so we can merge it |
@@ -82,6 +82,8 @@ void ComboBoxBase::bindTo(const Json::Value& value) | |||
index = int(std::distance(values.begin(), itr)); | |||
} | |||
} | |||
else if (!selectedValue.empty()) | |||
_lostValue = selectedValue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bedoel je "lost" value of "last" value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I called it lostValue because of the issue it solves: the dropdown is initialized with a value, but has no possible values (its model is empty). This is due to the fact that the VariablesList it depends on, gets initialized afterwards. In this case (when the dropdown has for values the levels of a VariablesList control), the dropdown has no way of guessing on which control it depends (values : varList.levels
: the values are set with a list of strings, the levels, but it has no reference of the varList control self). This means that during the initialization of the form, VariablesList might be initialized after the dropdown.
Usually, if the dropdown is set with a non-existing value, it neglects this value (probably it comes from an old version of the analysis, and sets a warning), but in this case we want to keep this value until the form is completely initialized: if in the meantime, the dropdown gets a signal that its model is updated, it should try again to set this lostValue
.
Maybe lostValue
is not a good choice, but lastValue
is definitly not he right name. This value should be used only during the initialization of the form. Some comments in the code would be nice also....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I replaced _lostValue by _unusedInitialValue. And add some comments
. In Test Variable Encoding, if you drag & drop 2 variables in an Interaction VariablesList, it adds automatically the interaction term. If there is an allowed type, the terms should get automatically this type even if they have another type. This does not work for the interaction term: in the result, we can still see that it keeps the original types. . In Test Sources with special attributes analysis, in the source with levels section. If you set a nominal/ordinal variable, you see the levels of the variable in the dropdown. If you duplicate the analysis, it loses these values.
dec1f48
to
d839c51
Compare