Jetzt funktioniert es so:
Delphi-Quellcode:
type
TImport_Virtual = class(TObject)
private //Basisklasse für ImportTyp
FFileName: String;
FFileExt: String;
public
FData: TDataArray;
constructor Create; virtual; abstract;
destructor Destroy; virtual; abstract;
function OpenFile(var Err: String):Boolean; virtual; abstract;
function CloseFile(var Err: String):Boolean; virtual; abstract;
function Analyse(var Err: String):Boolean; virtual; abstract;
function GetData(var Dat: TDataArray):Boolean;
property FileName: String read FFileName write FFileName;
end;
TImportClassType = class of TImport_Virtual;
TDBFImport = class(TImport_Virtual)
private //Import aus DBF-Datei
FDBF: TDBFFile;
public
constructor Create; override;
destructor Destroy; override;
function OpenFile(var Err: String):Boolean; override;
function CloseFile(var Err: String):Boolean; override;
function Analyse(var Err: String):Boolean; override;
end;
aber man darf dann im Create nicht inherited Create; aufrufen