Own Events in TadxAddin

Add-in Express™ Support Service
That's what is more important than anything else

Own Events in TadxAddin
How to implement own Events logic in TypeLibrary 
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-Deklarationen }
    FConnectionPoints: TConnectionPoints;
    FConnectionPoint: TConnectionPoint;
    FSinkList: TList;
    FEvents: IComyTestEvents;
    procedure Initialize; override;
    { Protected-Deklarationen }
    property ConnectionPoints: TConnectionPoints read FConnectionPoints
      implements IConnectionPointContainer;
    procedure EventSinkChanged(const EventSink: IUnknown); override;

uses ComServ;

procedure TComyTest.EventSinkChanged(const EventSink: IUnknown);
  FEvents := EventSink as IComyTestEvents;
  if FConnectionPoint <> nil then
     FSinkList := FConnectionPoint.SinkList;

procedure TComyTest.Initialize;
  inherited Initialize;
  FConnectionPoints := TConnectionPoints.Create(Self);
  if AutoFactory.EventTypeInfo <> nil then
    FConnectionPoint := FConnectionPoints.CreateConnectionPoint(
      AutoFactory.EventIID, ckSingle, EventConnect)
  else FConnectionPoint := nil;

Problem is that EventTypeInfo is allways falls with nil...

Is here someone who can help?

Best regards
Posted 28 Nov, 2006 10:30:54 Top
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:

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.

Posted 28 Nov, 2006 11:40:07 Top
Patrik Tesar

Posts: 2
Joined: 2006-11-28
Thanx! It work's now!
Posted 29 Nov, 2006 05:31:38 Top