Ok this is becoming quite silly...
It's the second time (the first time was 30min before, on a function to get directory tree) I ever see the error "Abstract error", and really can't tell why would it happen.
I had this function, to list all of the hard drives:
function TForm2.GetDriveList:TStringList;
 var
    s:string;
    i:integer;
    DriveStr:array[1..255] of char;
    t:integer;
  begin
    GetLogicalDriveStrings(255,@DriveStr);
    result:=TStringList.create;
    i:=1;
    repeat
      s:='';
      while (i<=255) and (DriveStr[i]<>#00) do
      begin
        s:=s+char(drivestr[i]);
        inc(i);
      end;
      inc(i); {step over #00}
      t:=getdrivetype(Pchar(s));
      if (length(s)>0) and (t=DRIVE_FIXED)
        then result.add(s);
    until length(s)=0;
 end;
Now, I changed the TStringList to TStrings, and I get this Abstract error when trying to call it;
I also tried to change it to procedure, as
procedure TFrom2.GetDriveList(List: TStrings);
removing the result from the code, and having List.Add(s) at the end;
This (function to procedure) somehow solved the issue in my first case, but doesn't on this one.
My questions are: What is wrong in the code above, and why is TStrings not accepted...?
and: what the heck are these abstract errors, how to identify them, since they appear (by debug inspection) on the very end of the function/procedure, after it is basically already done?
TStrings. Please consult the fine documentation. - Free ConsultingTListBox.Itemsisn'tTStringsinternally, but this is completely different story. - Free Consulting