Hi,<br>I am currently having problems with my event handler and would appreciate if anybody suggests me&nbsp; a solution.<br><br>The ProcessVertexSelection (user defined) method is activated when some selections are made (based on SelectionChangeEvent). Everything is good upto this point. Here is the code for this:<br>
<br>edgePicked-&gt;SetCallback(network-&gt;ProcessVertexSelection);<br>edgePicked-&gt;SetClientData((void *)static_cast&lt;vtkSelectionLink*&gt;(edgeLink));<br>selections-&gt;AddObserver(vtkCommand::SelectionChangedEvent, edgePicked);<br>
<br>This part works and I can get the selections. Now I want to add another functionality: The user may want to delete the current selections by using key &#39;d&#39; or &quot;delete&quot; whichever is simple to implement. I know that GetKeySym can be used to get key symbol. However, if I add the following code to activate another method to do deletions, the event handler ignores it. It never activates the method which is named as EVTDelete (in my code) where I plan to check which key is used.<br>
<br>delPicked-&gt;SetCallback(network-&gt;EVTDelete);<br>delPicked-&gt;SetClientData((void *)static_cast&lt;vtkSelectionLink*&gt;(edgeLink));<br>selections-&gt;AddObserver(vtkCommand::KeyPressEvent, delPicked);<br><br>Why doesn&#39;t my event handler listen do the keypresses other than the default ones?<br>
Thanks a lot.<br>Aytekin<br clear="all"><br>-- <br>My web page: <a href="http://www.cs.rpi.edu/~vargua">http://www.cs.rpi.edu/~vargua</a><br>