&quot;// Initialize must be called prior to creating timer events.&quot;<br><br>This comment and &quot;example / test&quot; code for interactor timers can be found in:<br>VTK/Rendering/Testing/Cxx/TestInteractorTimers.cxx<br>
<br>Also, you should use CreateRepeatingTimer or CreateOneShotTimer which are newer APIs that replace the old single timer implementation accessed via CreateTimer...<br><br><br>HTH,<br>David<br><br><br><div><span class="gmail_quote">On 2/8/08, <b class="gmail_sendername">Wesley Smith</b> &lt;<a href="mailto:wesley.hoke@gmail.com">wesley.hoke@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;">
Hi,<br> I&#39;m trying to figure out how to get the callback from a timer on a<br> vtkRenderWindowInteractor.&nbsp;&nbsp;I&#39;m adding the interactor to the window<br> with SetRenderWindow, and then calling:<br> <br> win-&gt;m_iren-&gt;CreateTimer(VTKI_TIMER_FIRST);<br>
 <br> This is on Windows by the way.&nbsp;&nbsp;Then, I do<br> <br> class myCommand : public vtkCommand<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;static myCommand *New()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ return new myCommand; }<br>
 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;virtual void Execute(vtkObject *caller, unsigned long, void* CBdata)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;Timer\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};<br> <br> myCommand *cmd = myCommand::New();<br>
 win-&gt;m_iren-&gt;AddObserver(vtkCommand::TimerEvent, cmd);<br> <br> And finally start everything up.&nbsp;&nbsp;The problem is I&#39;m not getting any<br> any callbacks.&nbsp;&nbsp;Clearly since this isn&#39;t working I&#39;m not understanding<br>
 how to do this.&nbsp;&nbsp;What is the canonical method for betting a timer<br> callback here?&nbsp;&nbsp;Google and the VTK docs haven&#39;t turned anything up.<br> <br> thanks,<br> wes<br> _______________________________________________<br>
 This is the private VTK discussion list.<br> Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br> Follow this link to subscribe/unsubscribe:<br>
 <a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br> </blockquote></div><br>