Wie wäre es denn mit sowas?
Delphi-Quellcode:
type
TMyType ...
private
_events = array of TNotifyEvent;
procedure myOnChange(Sender: TObject);
procedure raiseOnChange(Sender: TObject);
function GetEvent: TNotifyEvent;
procedure SetEvent(Event: TNotifyEvent);
public
property OnChange: TNotifyEvent read GetEvent write SetEvent;
...
procedure TMyType.myOnChange(Sender: TObject);
begin
raiseOnChange(Sender);
end;
procedure TMyType.raiseOnChange(Sender: TObject);
var i: Integer;
begin
for i := 0 to High(_events) do
if Assigned(_events[i]) then
_events[i](Sender);
end;
functin TMyType.GetEvent: TNotifyEvent;
begin
Result := myOnChange;
end;