mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 00:09:25 +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;
|
||||
if bIsDispatch and (sDefEvents<>'') then //add event signatures
|
||||
if bIsDispatch and (sDefEvents<>'') and (FEventSignatures[idx]<>'already defined') then //add event signatures
|
||||
begin
|
||||
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('');
|
||||
end;
|
||||
AddToInterFace(' Co%s = Class',[BstrName]);
|
||||
@ -1556,7 +1556,7 @@ begin
|
||||
AddToInterFace(' end;');
|
||||
AddToInterFace('');
|
||||
end
|
||||
else if bIsDispatch and (sDefEvents<>'') then //add function variables
|
||||
else if bIsDispatch and (sDefEvents<>'') then //add event sink descendant
|
||||
begin
|
||||
if FUses.IndexOf('Eventsink')<0 then
|
||||
FUses.Add('EventSink');
|
||||
|
Loading…
Reference in New Issue
Block a user