[Kst] [Bug 128436] New: invalid fields should not be loaded as 0 (zeroes)
nicolas.brisset at eurocopter.com
Thu Jun 1 12:42:54 CEST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Summary: invalid fields should not be loaded as 0 (zeroes)
AssignedTo: kst kde org
ReportedBy: nicolas.brisset eurocopter com
Version: 1.3.0_devel (using KDE 3.4.0, compiled sources)
Compiler: gcc version 3.4.3
OS: SunOS (sun4u) release 5.8
Maybe this is just a documentation problem, or dependent on datasources. Feel free to close this if you feel it is not a bug...
When you try to load unexisting fields e.g. from an ASCII file, if the field can't be found instead of complaining kst will load zeroes.
1) load VAR1 and VAR2 vs INDEX from the file I'll attach soon (or any other ASCII file), with the right settings (data from line 1, fields in line 0)
2) save the plot to plot.kst
3) edit the data file and change VAR1 to VAR1234 (could well happen with files generated by external programs, where some fields may or may not exist according to the configuration in use)
4) reload plot.kst: VAR1234 is loaded with zeroes whereas I would expect a warning that this field could not be loaded (like I have seen in some circumstances I can't remember)
This is strange, considering that the ASCII datasource implements isValidField(): I would expect that it is called before readField() is called. Another option would be for datasources to perform the check within readField, but that looks wrong to me somehow.
More information about the Kst