[Kalzium] Bug in the calculator of Kalzium. May I introduce a new string?
Carsten Niehaus
cniehaus at gmx.de
Thu Dec 29 13:37:34 CET 2005
Hi
In Kalzium you can calculate the molecular weight of a molecule.
Calculate "CO2Of". Of course there is no element "f". The result is (on the
shell)
kalzium: Found element C
kalzium: Found element O
kalzium: Weight of term = 12.0107
kalzium: [Element* MoleculeParser::lookupElement(const QString&)] no such
element: Of
kalzium: Weight of term = 31.9988
kalzium: Mass of CO2Of = 44.0095
The GUI presents 44.0095 as the result to the user. No errormessage. This is
wrong for two reasons:
1 - As the input was invalid there should be no result
2 - *If* we show a result it be neglect the "f" and display "60.0089" as a
result because the would be correct for "CO2O".
Now calculate "CO2O":
kalzium: Found element C
kalzium: Found element O
kalzium: Weight of term = 12.0107
kalzium: Found element O
kalzium: Weight of term = 31.9988
kalzium: Weight of term = 15.9994
kalzium: Mass of CO2O = 60.0089
The result is correct and presented as 60.0089.
Solution: Display a "Invalid input"-error.
Question 1: Is this the same as BUG 117774?
Question 2 (for the kde-i18n-folks): Would it be ok to display the new
errormessage? I would introduce the new string today. I am not sure if this
bugfix+new message would be covered by the current message-policy...
Carsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kalzium/attachments/20051229/49fbe64a/attachment.pgp
More information about the Kalzium
mailing list