[Kst] ASCII config patch

George Staikos staikos at kde.org
Tue Feb 1 02:02:33 CET 2005

On Monday 31 January 2005 13:26, Barth Netterfield wrote:
> Regarding ascii configuration:
> It seems to me that perhaps the correct way to do this is to make a
> separate csv data source, rather than using the generic ascii one.  csv
> seems to be pretty well documented  - see
> http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
> and, as it is used by exel, very common.  So it would be really great to
> support it.

  I agree with this one.  I was thinking the same thing when I read the 
original message.

> Supporting csv via a highly configureable generic data source, however,
> seems like the *wrong* way to do it.  I would prefer a virtually
> non-configurable data source which supports it directly.

  Right, it starts to get very specialized for the ascii source.

> The one configuration option we *might* need is whether the first row
> contains field names.  We could guess correctly with pretty high
> reliability, by seeing if the first row is numbers or not, but we should
> allow a checkbox override to our guess.
> I guess we could provide pretty reliable heurisics to decide if the file is
> csv or generic ascii (eg, is it comma separated... does it end in .csv) but
> we might want to provide a way of overriding the choice in the datasource
> selection widget.
> In the first instance, we should try for the pure automagic approach. 

   Manually overriding the data source choice is a possibility, but I am sure 
it can cause crashes.  For instance, I bet some of the libraries out there 
just don't expect to see horribly corrupt files (which is what a file of the 
wrong type would look like).

George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/

More information about the Kst mailing list