Ну скажем такой набросок:
для EditMultiEx.pas
.....
PListEH = ^TListEH;
TListEH = record
Hnd:THIEditMultiEx;
Prv:PListEH;
end;
implementation
uses hiMultiElementEx;
procedure THIEditMultiEx.onEvent;
var X:TListEH;
begin
X.Hnd := Self;
X.Prv := THIMultiElementEx(FParent).EvHandle;
THIMultiElementEx(FParent).EvHandle := @X;
_hi_onEvent(THIMultiElementEx(FParent).Events[Index],Data);
THIMultiElementEx(FParent).EvHandle := X.Prv;
end;
.....
.....
procedure THIMultiElementEx.HDelete(var Data:TData; Index:word);
var F:THIEditMultiEx;
G:PListEH;
begin
F := THIEditMultiEx(ToInteger(Data));
if FList.IndexOf(f) = -1 then exit;
G := EvHandle;
while assigned(G) do begin
if F=G.Hnd then begin
_debug('Ты чё, сдурел ?!');
exit;
end;
G := G.Prv;
end;
_hi_OnEvent(F.Works[Index],Data);
if FChild = F then FChild := nil;
F.MainClass.Destroy;
FList.Remove(F);
end;
.....