alex rait

alex rait

  • NA
  • 1
  • 0

visual studio .NET 2003 add-in. Events don't do the expected

Jan 5 2006 11:56 AM
I am quite desperate with this, hopefully someone might help here:
So I have created my own add-in for visual studio. Now I want to catch the event of "line change". That is when the user no longer edits some line and moves to another.
In the "OnConnection" method of the addin, I add this line:

applicationObject.Events.get_TextEditorEvents(null).LineChanged+=new _dispTextEditorEvents_LineChangedEventHandler(Connect_LineChanged);
and in the handler I open a messagebox.
The problem is, that the add-in works perfectly, untill... I open a new XML file!!
then it stops working in any of the documents...
Am I doing something wrong?