Hi,<br>I am currently having problems with my event handler and would appreciate if anybody suggests me 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->SetCallback(network->ProcessVertexSelection);<br>edgePicked->SetClientData((void *)static_cast<vtkSelectionLink*>(edgeLink));<br>selections->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 'd' or "delete" 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->SetCallback(network->EVTDelete);<br>delPicked->SetClientData((void *)static_cast<vtkSelectionLink*>(edgeLink));<br>selections->AddObserver(vtkCommand::KeyPressEvent, delPicked);<br><br>Why doesn'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>