Hallo Stevie!
Ich bekomme folgenden Fehler, wenn ich ein Multicast Event in einem Multicast Event auslöse. Dieser Fehler tritt nur bei anonymen Methoden und nicht bei Methodenzeigern auf.
Exception: First chance
exception at $746C23CC.
Exception class $C0000092 with message 'floating point stack check at 0x746c23cc'. Process Project1.exe (2052)
Delphi-Quellcode:
{$M+}
TEventTest = reference to procedure;
{$M-}
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
_EventTest1 : Event<TEventTest>;
_EventTest2 : Event<TEventTest>;
procedure ProcessEventTest1;
procedure ProcessEventTest2;
function GeteventTest1: Event<TEventTest>;
function GeteventTest2: Event<TEventTest>;
property EventTest1: Event<TEventtest> read GetEventTest1;
property EventTest2: Event<TEventtest> read GetEventTest2;
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Self.EventTest1.Add(Self.ProcessEventTest1);
Self.EventTest2.Add(Self.ProcessEventTest2);
_EventTest1.Invoke();
end;
procedure TForm1.ProcessEventTest1;
begin
_EventTest2.Invoke(); <- hier
end;
procedure TForm1.ProcessEventTest2;
begin
//
end;
function TForm1.GetEventTest1: Event<TEventTest>;
begin
Result := _EventTest1.EventHandler;
end;
function TForm1.GetEventTest2: Event<TEventTest>;
begin
Result := _EventTest2.EventHandler;
end;
end.