Einzelnen Beitrag anzeigen

barnti

Registriert seit: 15. Aug 2003
Ort: Mal hier mal da...
689 Beiträge
 
Delphi 7 Enterprise
 
#1

Initialization-Section: Initialisieren von Variablen

  Alt 10. Nov 2004, 14:10
Hallo,

folgender Codeauszug:
Delphi-Quellcode:
unit Main;

interface

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

type
  TForm1 = class(TForm)
  private
    FPDInterface: TPDInterface;
    function GetPDInterface: TPDInterface;
    procedure SetPDInterface(const Value: TPDInterface);
    { Private declarations }
  public
    Property PDInterface: TPDInterface read GetPDInterface write SetPDInterface;
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

{ TForm1 }

function TForm1.GetPDInterface: TPDInterface;
begin
  Result:= FPDInterface;
end;

procedure TForm1.SetPDInterface(const Value: TPDInterface);
begin
  FPDInterface:= Value;
end;

Initialization
  FPDInterface:= TPDInterface.Create
end;

end.
Ich möchte im Initialisationsabschnitt die Variable 'FPDInterface' initialisieren. Leider bekomme ich die Fehlermeldung:
Undefinierter Bezeichner.
Weiß jemand Rat?
Gruß,

Barnti
  Mit Zitat antworten Zitat