Einzelnen Beitrag anzeigen

Bigeddie

Registriert seit: 5. Mär 2005
Ort: Kerzenheim
98 Beiträge
 
#25

Re: Leere Klasse von einer anderen abgeleitet

  Alt 31. Aug 2005, 10:31
hier nochmal der Deklarationsteil der Klasse TBWData:
Code:
TBWData = Class(TObject)
   Private
    FDataStructure: TBWTable;
    DatStrings: Tlist;
    Procedure SetDataStructure(Const Value: TBWTable);
  Published
    Property DataStructure: TBWTable Read FDataStructure Write SetDataStructure;
//    Constructor create(TheStructure: TBWTable; Path: String); Overload;
    Function GetLine(Number: word): String;
    Function Count: Integer;
    Function GetFieldContent(FieldName: String; LineNumber: Word): String;
    Function GetFieldContentwhereFieldIncl(InclField: String; InclContent:
      String; FieldName: String): TStringlist; Overload;
    Function GetColumn(FieldName: String): TStringList;
    Function GetLinesWhereFieldContains(FieldName: String; ContString: String):
      Tlist;
  Public
    Function GetFieldContentwhereFieldIncl(InclField: Word; InclContent: String;
      Fieldnr: word): TStringlist; Overload;
    Constructor create(TheStructure: TBWTable; FieldList: TList); Overload;
    Constructor create(TheStructure: TBWTable; Path: String); Overload;
  End;
der Deklarationsteil der Klasse TWaregroup
Code:
twaregroup = class(TBWData)
  public
    constructor create(TheStructure: TBWTable; Path: String);
  end;
und die constructoren:
Code:
Constructor TBWData.create(TheStructure: TBWTable; Path: String);
Var
  Buffer: TStringList;
  i: integer;
  DatLine: TDatLine;
Begin
  inherited Create;
  DataStructure := TheStructure;
  DatStrings := Tlist.Create;
  Buffer := TStringlist.Create;
  buffer.LoadFromFile(path + self.FDataStructure.DatFile);
  If self.FDataStructure.LineIdentifier <> chr(254) Then
    Begin
      For i := 0 To buffer.Count - 1 Do
        Begin
          If buffer[i][1] = self.FDataStructure.LineIdentifier Then
            Begin
              DatLine := TDatline.create(buffer[i], i);
              DatStrings.Add(DatLine);
            End;
        End;
    End
  Else
    Begin
      For i := 0 To buffer.Count - 1 Do
        Begin
          DatLine := TDatline.create(buffer[i], i);
          DatStrings.Add(DatLine);
        End;
    End;
End;

constructor twaregroup.create(TheStructure: TBWTable; Path: String);
begin
inherited create(TheStructure,Path);
end;
und der Fehler ist immernoch der gleiche
kommt zeit
kommt rat
kommt attentat
oder wie war das?
  Mit Zitat antworten Zitat