<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=313342706-13072005><FONT face=Arial size=2>Hi,
</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial size=2>I am using
wxvtkRenderWindowInteractor and am trying to catch some events with the
AddObserver method to a vtkInteractorStyleSwitch. This does not seem to work
properly!</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2>...</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial size=2>ist =
widget.GetInteractorStyle() # returns
vtkInteractorStyleSwitch</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2>ist.AddObserver("CharEvent", OnChar)</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2>...</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial size=2>def OnChar(obj,
event):<BR> print(event)<BR>...</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial size=2>prints "CharEvent"
as expected, but event processing continues for some keys such as f (flies to
pick spot), but not for others, e.g. 't', (toggle to trackball mode).
</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2>...</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial size=2>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2>ist.AddObserver("LeftButtonPressEvent",
OnLeftMouseButtonDown)</FONT></SPAN></DIV></DIV></FONT></SPAN>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2>...</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial size=2>def
OnLeftButtonDown(self, obj, event):<BR>
print('Ha')<BR>...</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial size=2>doesn't seem to be
called at all!</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial size=2>I know I could use
the wx event mechanism but I'd like to avoid it to stay independent of
wx.</FONT></SPAN></DIV>
<DIV><SPAN class=313342706-13072005><FONT face=Arial
size=2> </DIV></FONT></SPAN>
<DIV><SPAN class=313342706-13072005><FONT face=Arial size=2>I am wondering
whether anybody else might have identified the same problems:
</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV class=Section1>
<P class=MsoAutoSig align=left><FONT size=2><FONT
color=#0000ff>--<?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P>
<P class=MsoAutoSig><FONT size=2><FONT color=#0000ff>Sven Prevrhal,
Ph.D.<o:p></o:p></FONT></FONT></P>
<P class=MsoAutoSig align=left><FONT size=2><FONT color=#0000ff>Department of
Radiology<o:p></o:p></FONT></FONT></P>
<P class=MsoAutoSig><FONT size=2><FONT color=#0000ff>University of California,
San Francisco<o:p></o:p></FONT></FONT></P></DIV></BODY></HTML>