Einzelnen Beitrag anzeigen

swestner

Registriert seit: 31. Aug 2012
Ort: Hallstadt
74 Beiträge
 
Delphi 10.4 Sydney
 
#1

Delphi 12 / TList unter 64 Bit funktioniert nicht mehr wie unter 11.3

  Alt 10. Nov 2023, 13:06
Delphi-Version: 11 Alexandria
Hallo,

folgender Code hat mit Delphi 11.3 unter 32 und 64 Bit problemlos compiliert. Mit Delphi 12 32 Bit funktioniert es weiterhin, mit Delphi 12 64 Bit gibt es Fehler:

Delphi-Quellcode:
type TSupBookList = class(TList)
private
     function GetItems(Index: integer): TSupBook;
public
     destructor Destroy; override;
     procedure Clear; override;
     procedure Add(P: PRecSUPBOOK); overload;
     procedure Add(Path,Filename,SheetName: AxUCString); overload;
     function AddEncodec(Tabs: integer; Code: word): integer;
     property Items[Index: integer]: TSupBook read GetItems; default;
end;

type TExternalNames = class(TObject)
private
     FSupBooks: TSupBookList;
public
     procedure SetCRN (SheetIndex: integer; P: PRecCRN; Size: word);
end;

procedure TExternalNames.SetCRN(SheetIndex: integer; P: PRecCRN; Size: word);
begin
  if FSupBooks.Count <= 0 then
    raise XLSRWException.Create('No SUPBOOK for CRN');
  if SheetIndex >= FSupBooks[FSupBooks.Count - 1].Count then // <----E2018 Record, object or class type required
    raise XLSRWException.Create('Invalid SUPBOOK Sheet Index');
  FSupBooks[FSupBooks.Count - 1].Sheets[SheetIndex].SetCRN(P,Size); // <----E2018 Record, object or class type required
end;
Wo ist da jetzt das Problem? Zumal alles mit 11.3 funktioniert hat.

Wurde in 12 was an TList geändert?

Grüße

Stefan Westner
Stefan Westner

Geändert von TBx (10. Nov 2023 um 16:35 Uhr) Grund: Delphi-Tags eingefügt
  Mit Zitat antworten Zitat