Hallo Experten,
der Code ist doch eine vollkommen normale Konstruktion, aber warum die ACCESS VIOLATION?
(Den Code habe ich exact in der dargestellten Version getestet.)
Vielleicht gewinne ich ja einen Preis für das "kürzeste abstürzende Delphi 7 Programm", aber lieber wäöre mir ein Tipp von Euch.
Gruß
GuaAck
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66:
| PROGRAM Fehlertest;
USES Forms, UFehlertest IN 'UFehlertest.pas' , UHashs IN 'UHashs.pas';
{$R *.res}
BEGIN application.Initialize; application.CreateForm(TForm1, Form1); application.Run; END.
UNIT UHashs;
INTERFACE
TYPE tHashs = CLASS CONSTRUCTOR Create; PUBLIC anzahl: integer; END;
IMPLEMENTATION
CONSTRUCTOR tHashs.Create; BEGIN anzahl := 0; END; END.
UNIT UFehlertest;
INTERFACE
USES Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, UHashs;
TYPE TForm1 = CLASS(TForm) PROCEDURE FormCreate(Sender: TObject); PRIVATE PUBLIC hash_zu_EG: tHashs; END;
VAR Form1: TForm1;
IMPLEMENTATION
{$R *.dfm}
PROCEDURE TForm1.FormCreate(Sender: TObject); BEGIN hash_zu_EG.Create; END; END. |
Moderiert von
Martok: Delphi-Tag repariert