Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002355 [JEDI VCL] 00 JVCL Components minor always 2004-12-02 05:55 2005-02-11 20:44
Reporter ZioNemo View Status public  
Assigned To wapostma
Priority normal Resolution fixed  
Status resolved   Product Version 3.00 BETA 2
Summary 0002355: TJvCsvDataSet: inconsistent use of Separator
Description Separator is used also when parsing CsvFieldDef, but the property editor always uses a comma.
This can be very confusing.
I have a semicolon-separated file and I had to manually change all the commas to semicolons in CsvFieldDef; not a big deal, but it took me some time to uderstand why my headers were not parsed correctly.
IMHO it would be better to instruct the component to ignore Separator settings while parsing CsvFieldDef (what happens if I have a colon-separated file??).

Regards
ZioNemo
Additional Information I'm using CVS (about 2 weeks old) and Delphi7.
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0005817)
ZioNemo (reporter)
2004-12-03 02:43

A few more things:
After I manually changed CsvFieldDef separtor by hand the property editor is utterly unusable (as expected).
Also the Sort(string, boolean) method uses Separator to parse the fields to sort upon. This should be consistent with CsvFieldDef usage (so, if You decide to always use a comma, this should follow suit)

Regards
ZioNemo
(0006333)
wapostma (developer)
2005-02-02 07:15

R.Marquardt's fix to CVS, rev 1.22 of JvCsvDataForm.pas actually broke the normal designtime operation of the form. I am going to try to fix it without reversing any progress made in this issue so far.

Here is the problem:

This is what there WAS in cvs rev 1.21 I think:

procedure TJvCsvDefStrDialog.UpdateCsvStr;
var
  I: Integer;
  S: string;
begin
  S := '';
  for I := 0 to ListBoxFields.Items.Count - 1 do
    if S = '' then
      S := ListBoxFields.Items[I]
    else
      S := S + ',' + ListBoxFields.Items[I]; // <---
  EditCsvStr.Text := S;
end;


here is what it got changed to:

procedure TJvCsvDefStrDialog.UpdateCsvStr;
var
  I: Integer;
  S: string;
begin
  S := '';
  for I := 0 to ListBoxFields.Items.Count - 1 do
    if S = '' then
      S := ListBoxFields.Items[I]
    else
      S := S + FSeparator + '"' + ListBoxFields.Items[I] + '"'; // <--
  EditCsvStr.Text := S;
end;

So my question is for Robert, why did you put the quotes in there? It breaks stuff.

I suggest taking the quotes out. I agree with the FSeparator change, that's fine, but what about those quotes?
(0006459)
wapostma (developer)
2005-02-11 20:40

a patch has been put in to make it use the customized separator in the CsvFieldDef. Personally I thought CsvFieldDef should always have commas even if the file didn't, but this decision has already been made, and is probably not going to be a big deal anymore. i think this issue can be closed.
(0006460)
wapostma (developer)
2005-02-11 20:44

Fixed in CVS.

- Issue History
Date Modified Username Field Change
2004-12-02 05:55 ZioNemo New Issue
2004-12-03 02:43 ZioNemo Note Added: 0005817
2005-01-04 10:47 robert_marquardt Status new => resolved
2005-01-04 10:47 robert_marquardt Resolution open => fixed
2005-01-04 10:47 robert_marquardt Assigned To => robert_marquardt
2005-01-04 10:47 robert_marquardt Assigned To robert_marquardt =>
2005-02-02 07:15 wapostma Assigned To => wapostma
2005-02-02 07:15 wapostma Status resolved => feedback
2005-02-02 07:15 wapostma Resolution fixed => reopened
2005-02-02 07:15 wapostma Note Added: 0006333
2005-02-11 20:40 wapostma Note Added: 0006459
2005-02-11 20:44 wapostma Status feedback => resolved
2005-02-11 20:44 wapostma Resolution reopened => fixed
2005-02-11 20:44 wapostma Note Added: 0006460


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker