Einzelnen Beitrag anzeigen

stiftII

Registriert seit: 2. Sep 2009
Ort: Cuxhaven
122 Beiträge
 
#6

Re: TStringList - Zugriffsverletzung beim erstellen

  Alt 27. Nov 2009, 19:03
Danke für den Hinweis.

Es wird leider immer noch eine "Access Violation" erzeugt.

~stift

// Das ist der gesamte Code
:
Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type

Test = class
    All : TStrings;
    Male : TStrings;
    Female : TStrings;
    constructor Create;
  end;


  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  blub: test;
implementation

{$R *.dfm}



  constructor Test.Create;
  begin
    All := TStringList.Create;
    Male := TStringList.Create;
    Female := TStringList.Create;
  end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  blub.Create;
end;

end.
  Mit Zitat antworten Zitat