Patrik Tesar
Posts: 2
Joined: 2006-11-28
|
Hi all.
I want to implement own events in AddinExpress tlb.
I've changed
TComyTest = class(TadxAddin, IConnectionPointContainer, IComyTest)
private
{ Private-Deklarationen }
FConnectionPoints: TConnectionPoints;
FConnectionPoint: TConnectionPoint;
FSinkList: TList;
FEvents: IComyTestEvents;
public
procedure Initialize; override;
protected
{ Protected-Deklarationen }
property ConnectionPoints: TConnectionPoints read FConnectionPoints
implements IConnectionPointContainer;
procedure EventSinkChanged(const EventSink: IUnknown); override;
end;
uses ComServ;
procedure TComyTest.EventSinkChanged(const EventSink: IUnknown);
begin
FEvents := EventSink as IComyTestEvents;
if FConnectionPoint <> nil then
FSinkList := FConnectionPoint.SinkList;
end;
procedure TComyTest.Initialize;
begin
inherited Initialize;
FConnectionPoints := TConnectionPoints.Create(Self);
if AutoFactory.EventTypeInfo <> nil then
FConnectionPoint := FConnectionPoints.CreateConnectionPoint(
AutoFactory.EventIID, ckSingle, EventConnect)
else FConnectionPoint := nil;
end;
Problem is that EventTypeInfo is allways falls with nil...
Is here someone who can help?
Best regards
Patrik |
|
Dmitry Kostochko
Add-in Express team
Posts: 2875
Joined: 2004-04-05
|
Hi Patrik,
It seems you have forgotten to correct the type library of your add-in. You can download the example project here:
http://www.add-in-express.com/projects/adx_events_test_d7.zip
P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
|
|
Patrik Tesar
Posts: 2
Joined: 2006-11-28
|
|