in Delphi 7 , declared an class and created a class from it, (in the uml meaning).
the class contains a public field type of stringlist.
after passing the object a few times, the first letter in the first row is trimed out.
how do i trace it from not happening???
the function calling that trims is
stringlist.ValueFromIndex[i];
more information?
well its something like this.
type
TObjectionFilterFields = class(TObject)
private
public
z,x,c,v,b,n,a,s:integer;
list1:TStringList;
list2:TStringList;
enum:TEnum;
constructor Create; //override;
destructor Destroy; //override;
end;
now at one object we invoke create, and insert data, and pass it on.
on another object we grab the data and create a string out of it, with + concatination.
for i := 0 to list1.count-1
sql.add(''''+list1.ValueFromIndex[i] + ''''+'hdsjkf');
envoking stringlist.Strings[i] solved it
thanks
As far as I can understand. You have an object that contains a public field of the type TStringList.
You have created an instance and passed it to a function.
You can check the state of the object at each entry and exit point of each function so you find out when the change occurs. Post that code if you cannot find the problem yourself.
Please note that using public fields can be dangerous, because anything can access and change that field.