Bug 213158 - Can't change data file if it has columns headers
Summary: Can't change data file if it has columns headers
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-04 23:12 UTC by Eric Estievenart
Modified: 2009-11-06 20:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Estievenart 2009-11-04 23:12:53 UTC
Version:            (using KDE 4.3.2)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Create a simple plot with the following data:
-----------
x y
1 1
2 3
-----------
(use the data wizard, say that first row is the column title)

Then Tools/Change data file...
Use the same file (or one with same structure)

=> Error like fields x, y are not available.

Indeed there is no way to specify the structure of the file,
but maybe it should be guessed from the original one ?

Tested with 1.7 (debian old binary, sic) and
latest svn from kde4 port branch.

Cheers, and go on, it is really a great tool !
Comment 1 Eric Estievenart 2009-11-04 23:14:30 UTC
Of course a possible work-around is to avoid
the use of column names in the files, but...
I don't really like to have them named 1,2,3,...
Comment 2 Nicolas Brisset 2009-11-05 09:04:06 UTC
I believe it should work if you configure the ASCII datasource from Settings -> Configure Kst -> Data Sources tab -> Data source: ASCII File Reader to always accept files matching your name pattern (e.g. *.dat) and configure *.dat to have that specific format.
At least it used to work with older versions, I haven't checked recently.
Comment 3 Andrew Walker 2009-11-06 04:23:07 UTC
It would seem worthwhile to at least have a Configure... button next to the selected file, so that the user can override the default configuration.

The problem with guessing the file structure from the old one is that the input vectors may come from several different files, all with different configurations.
Comment 4 Andrew Walker 2009-11-06 05:30:12 UTC
SVN commit 1045437 by arwalker:

BUG:213158 Allow the user to configure a datasource from within the 'Change Data File' dialog

 M  +201 -149  changefiledialog.ui  
 M  +117 -5    kstchangefiledialog_i.cpp  
 M  +5 -7      kstchangefiledialog_i.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1045437
Comment 5 Eric Estievenart 2009-11-06 20:54:25 UTC
Whaou, you are very reactive, thanks a lot !
I'll test that as soon as I find some time to build it