Is the 3rd event, by any chance, the &quot;ExitEvent&quot;?<br><br>If not, what are the 3 events you do receive?<br><br>What does the rest of your code in main look like? Do you have your own event loop, or do you call Start on the RenderWindowInteractor?
<br><br>Post some more info and somebody will help you get to the bottom of this...<br><br><br>David<br><br><br><div><span class="gmail_quote">On 1/17/08, <b class="gmail_sendername">Mark Waligora</b> &lt;<a href="mailto:mark.waligora@gmail.com">
mark.waligora@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hey all,<br>I&#39;m having a problem with setting up an event handler.&nbsp; I create a class called UpdateCallback which inherits from vtkCommand.&nbsp; I override the Execute function from vtkCommand.&nbsp; My Execute function simply contains a print statement for the time being.&nbsp; 
<br><br>In my main function, I create an instance of my class and add it as an observer to my vtkRenderWindowInteractor for the &quot;AnyEvent&quot; event.<br><br>UpdateCallback* onUpdate = UpdateCallback::New();<br>iren-&gt;AddObserver(vtkCommand::AnyEvent, onUpdate);
<br><br>When I do this, my program prints the statement in my Execute function 3 times, and then exits.&nbsp; If I comment out the line of code that adds my UpdateCallback as an observer:<br><br>// iren-&gt;AddObserver(vtkCommand::AnyEvent, onUpdate);
<br><br>then the program runs as normal until you close it.&nbsp; I&#39;ve searched the mailing list, googled the problem, and I&#39;ve read through the code in vtkCommand and vtkObject trying to see if adding an observer somehow changes the behavior of the event handling.&nbsp; From what I can tell, any observer class should get called on the appropriate event, so adding my observer shouldn&#39;t create any additional side effects besides what the code in my observer does.&nbsp; Can anyone tell me what might be going on?
<br><br>Thanks a bunch in advance everyone!<br><span class="sg"><br>-Mark<br>
</span><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br></blockquote></div><br>