mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 20:49:23 +02:00
* Patch from Ludo that fixes that Event handlers were only created for the first CoClass that used the shared events
Mantis #21779 git-svn-id: trunk@20899 -
This commit is contained in:
parent
0afee490e2
commit
a680c4f1d6
@ -1480,10 +1480,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if bIsDispatch and (sDefEvents<>'') then //add event signatures
|
if bIsDispatch and (sDefEvents<>'') and (FEventSignatures[idx]<>'already defined') then //add event signatures
|
||||||
begin
|
begin
|
||||||
AddToInterface(FEventSignatures[idx]);
|
AddToInterface(FEventSignatures[idx]);
|
||||||
FEventSignatures[idx]:=''; // add event signatures only once. Multiple coclasses can use same events
|
FEventSignatures[idx]:='already defined'; // add event signatures only once. Multiple coclasses can use same events
|
||||||
AddToInterface('');
|
AddToInterface('');
|
||||||
end;
|
end;
|
||||||
AddToInterFace(' Co%s = Class',[BstrName]);
|
AddToInterFace(' Co%s = Class',[BstrName]);
|
||||||
@ -1556,7 +1556,7 @@ begin
|
|||||||
AddToInterFace(' end;');
|
AddToInterFace(' end;');
|
||||||
AddToInterFace('');
|
AddToInterFace('');
|
||||||
end
|
end
|
||||||
else if bIsDispatch and (sDefEvents<>'') then //add function variables
|
else if bIsDispatch and (sDefEvents<>'') then //add event sink descendant
|
||||||
begin
|
begin
|
||||||
if FUses.IndexOf('Eventsink')<0 then
|
if FUses.IndexOf('Eventsink')<0 then
|
||||||
FUses.Add('EventSink');
|
FUses.Add('EventSink');
|
||||||
|
Loading…
Reference in New Issue
Block a user