chump4life

Raise custom event in Add-In

Discussion created by chump4life on Oct 10, 2011
Latest reply on May 1, 2012 by idemerch
Hi,

I have an Add-In extension with an Add-In dockable window.  My extension is listening to ArcMap's document events.  I am raising my own custom event in the onactiveviewchanged event handler for my application.  I implemented an event listener in my dockable window to listen for the custom event because I want it to do something based on the custom event.  However, when I debug the application the custom event will fire but the dockable window's event listener will do nothing (doesn't even break at the routine).  Does anybody have any experience with what I am describing implementing Add-In?

The workaround I am using right now is to implement a shared sub routine called "HandleMyEvent" in the dockable window class.  When the onactiveviewchanged event fires, my handler will call the sub routine exposed by the dockable window object.  I am not sure if that is the correct way of doing it.  I just followed the sample code on Add-In from ESRI.  Thanks.

Steve

Outcomes