[Kst] [Bug 130195] New: Datasources should enforce field unicity
Nicolas Brisset
nicolas.brisset at eurocopter.com
Mon Jul 3 14:51:33 CEST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=130195
Summary: Datasources should enforce field unicity
Product: kst
Version: unspecified
Platform: unspecified
OS/Version: Solaris
Status: NEW
Severity: normal
Priority: NOR
Component: general
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
There currently is a flaw/excessive flexibility in some datasources (like ASCII for instance) where the provided field list can contain multiple entries with the same name.
The problem is that the datawizard allows selecting any of the entries while in fact only the first one can be accessed.
That should be fixed as there will be (in fact, there have been!) cases of users looking at some curves which don't come from the right field.
To illustrate the problem, I'll attach a small data file shortly. Select the second "VAR" field in the datawizard, and notice that it is the first one that actually gets plotted (of course, you have to configure the datasource so that fields are accessed by their names, otherwise the names are unique indeed).
The fix should be fairly simple: the datasource should check unicity before adding the fields when building the list, and remember the mapping for transformed names so that the data can be accessed later. The only concern here may be to provide a very fast lookup for the cases a user may have many variables (a few thousand is not uncommon around here!). I don't know what the best solution is, but I suspect Qt provides useful classes for that... I have no idea what the fasted solution is, though.
In most cases where an external lib is used to access the file (like CDF or netCDF) I believe this bug does not apply as the library will probably complain during file creation if a user tries to create two identical field names (at least, I hope so even though I still need to check!). But I think it should be fixed for ASCII, and possibly other formats which may exhibit the same problem.
More information about the Kst
mailing list