Ignore:
Timestamp:
Jun 12, 2007, 7:00:48 PM (18 years ago)
Author:
alloc
Message:
 
Location:
oup/current/FileClasses
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • oup/current/FileClasses/TXAN.pas

    r212 r213  
    2525  templist: TStringList;
    2626begin
     27  inherited;
    2728  FDataFields := TBlock.Create(Self, nil, 0, 'Base', '', nil);
    2829  templist := TStringList.Create;
  • oup/current/FileClasses/TXMP.pas

    r212 r213  
    2727  templist: TStringList;
    2828begin
     29  inherited;
    2930  FDataFields := TBlock.Create(Self, nil, 0, 'Base', '', nil);
    3031  templist := TStringList.Create;
  • oup/current/FileClasses/_DataTypes.pas

    r212 r213  
    319319    if i < Length(FDataFields) then
    320320    begin
    321       ShowMessage('Field exists');
     321      ShowMessage('Field already exists');
    322322      Exit;
    323323    end;
  • oup/current/FileClasses/_FileTypes.pas

    r212 r213  
    2525
    2626      procedure InitDatLinks; virtual; abstract;
    27       procedure InitDataFields; virtual; abstract;
    2827      procedure InitRawList; virtual; abstract;
    2928
     
    3938      procedure Free;
    4039
     40      procedure InitDataFields; virtual;
     41
    4142      property FileStream: TMemoryStream read FFileStream;
    4243      property FileID: Integer read FFileID;
     
    9798
    9899  InitDatLinks();
    99   InitDataFields();
    100100  InitRawList();
     101  FDataFields := nil;
    101102
    102103  if not (Self is TFile_Empty) then
     
    222223
    223224
     225procedure TFile.InitDataFields;
     226begin
     227  if Assigned(FDataFields) then
     228    Exit;
     229end;
     230
    224231function GetDatLinkValue(stream: TStream; offset: Integer): Integer;
    225232begin
  • oup/current/FileClasses/_MetaManager.pas

    r212 r213  
    2929      constructor Create(ConnectionID: Integer);
    3030      procedure InitFile(id: Integer);
     31      procedure InitFileFields(id: Integer);
    3132
    3233      property FileCount: Integer read GetFileCount;
     
    5960procedure TMetaManager.InitFile(id: Integer);
    6061var
    61 //  i: Integer;
    6262  typei: Integer;
    6363  finfo: TFileInfo;
     
    8383        FFiles[id] := TFile_Empty.Create(FConnectionID, id);
    8484      Exit;
     85    end;
     86  end;
     87end;
     88
     89procedure TMetaManager.InitFileFields(id: Integer);
     90begin
     91  if id < ConManager.Connection[FConnectionID].GetFileCount then
     92  begin
     93    if not Assigned(FFiles[id]) then
     94    begin
     95      InitFile(id);
     96      if not (FFiles[id] is TFile_Empty) then
     97        FFiles[id].InitDataFields;
    8598    end;
    8699  end;
Note: See TracChangeset for help on using the changeset viewer.