fpc/tests/webtbs/tw31421a.pp
Jonas Maebe 1adde89621 * copy tcallnode.right after copying the callinitblock, as right can be a
temprefnode referring to a temp from the init block (mantis #31421)

git-svn-id: trunk@35478 -
2017-02-24 19:57:40 +00:00

39 lines
838 B
ObjectPascal

{ %norun }
{$mode objfpc}
{$h+}
unit tw31421a;
interface
type
TMessageReceivedEvent = function (const Received: TObject): boolean of object;
TMessageReceivedEventList = class
private
function Get(Index: Integer): TMessageReceivedEvent;
public
property MyItems[Index: Integer]: TMessageReceivedEvent read Get; default;
procedure ExecuteAll(A: TMessageReceivedEvent; const Received: TObject);
end;
implementation
{ TMessageReceivedEventList -------------------------------------------------- }
function TMessageReceivedEventList.Get(Index: Integer): TMessageReceivedEvent;
begin
//Result := ...;
end;
procedure TMessageReceivedEventList.ExecuteAll(A: TMessageReceivedEvent; const Received: TObject);
var
Handled: boolean;
begin
Handled := false;
Handled := MyItems[0](Received) or Handled;
end;
end.