Delphi-Quellcode:
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
procedure MyFormFunc;
public
{ Public-Deklarationen }
end;
TMyFunc = procedure() of object;
TRec = record
MyFunc: TMyFunc;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
var
R: TRec;
begin
R.MyFunc := MyFormFunc;
R.MyFunc();
end;
procedure TForm1.MyFormFunc;
begin
ShowMessage('asdf!');
end;
Edit: Ich glaube ich habe dich falsch verstanden... Lasse es trotzdem erstmal so stehen...