Open RossBoylan opened 11 months ago
As of v0.1.0 prerelease [7be74c2 2023-10-31] only Visit
and Site
have changed; they were the main problem areas, but there are other ComboBox
widgets, and they could throw exceptions.
fromtext()
does not match any existing choices
a) If it is empty, set currentIndex
to -1 and add tip saying to make a selection.
b) Otherwise
?
and the attempted value in the box as placeholderText
UnexpectedInputError
c) A valid selection undoes all the special handling in b).BComboBox
and BSiteComboBox
.Site
and Visit
setting trap the exceptions. They ignore them.BreastForm.readFile()
often does not use fromtext()
to update the values, and so will bypass all above (except that restoring regular values will undo weird coloring and tooltips, since it's tied to signals.placeHolderText
, which provides a more obvious alternative since it is always visible. Tooltips are now provided to offer additional information in most states. Mostly I implemented the alternate scheme (mentioned at the end of the original section) using coloring to highlight the problems and solutions.placeHolderText
. The old problem arose because the editText
might not match any of the items on the list, but it looked like any other selection. More testing required.ComboBoxes
from the file in BreastForm.readFile()
. Use fromtext()
uniformly and trap errors uniformly.The placeholder text is not being cleared out.
@Teffany agrees: no point in popup with all the errors. No other graphical tweaks needed.
Where we stand on the previous to do:
ComboBoxes
from the file in BreastForm.readFile()
. Use fromtext()
uniformly and trap errors uniformly. DoneLeaving open for now because of 2.
The Problem
When reading data from a text file the program inserts the text into various widgets, some of which are a
BComboBox
orBSiteComboBox
. Those widgets, and often (?) the underlying db, permit only a limited set of choices. Sometimes the text does not match any of them. This seems to produce erratic behavior, sometimes leaving the widget blank and sometimes with a random value (esp the first Site on the list, Georgetown).There is no explicit warning to the user that anything has gone wrong.
At one point, maybe when the fields were editable, there was also a problem that they could show text that didn't correspond to any allowed choice. Saving this might appear to work, but probably left
NULL
in the database.This is in v0.0.7
Ideal Behavior
Or, rather than 2, show the text from the file in the widget in a way that graphically indicates there is a problem, e.g., in red, or with a big colored border on the box.