[vtkusers] VTK CVS + wxPython...

Charl P. Botha c.p.botha at ewi.tudelft.nl
Wed Jul 21 12:20:45 EDT 2004


Andrea Gavana wrote:
> Traceback (most recent call last):
>   File "C:\Python23\myproject\wxVTKRenderWindowInteractor.py", line 290, in
> OnButtonUp
>     self.ReleaseMouse()
>   File "C:\Python23\Lib\site-packages\wxPython\windows.py", line 647, in
> ReleaseMouse
>     val = windowsc.wxWindow_ReleaseMouse(self, *_args, **_kwargs)
> wxPython.wxc.wxPyAssertionError: C++ assertion "GetCapture() == this" failed in
> e:\Projects\wx2.4\src\common\wincmn.cpp(2006): attempt to release mouse, but
> this window hasn't captured it

Argh, this is due to the mouse capturing.  I usually switch that off as 
the logic isn't failsafe yet.

> No idea on what this means. But, fortunately, is a rarely appearing message.
> Next, in my application I had defined a vtkOrientationMarkerWidget, but either
> I've done something wrong or there is something wrong in the interactor (the
> first is the MOST probable...), the vtkOrientationMarkerWidget does not follow
> the interactor. It is frozen. I've tried some modification, but it seems to me
> that the vtkOrientationMarkerWidget does not react to the mouse movements.
> This is the last part of my code:

Please send a sample that I can actually run.  Your code looks alright, 
but there's nothing like being able to test it.


> As a last thing, Charl mentioned that:
> 
> "In addition, a SetSize() call should be made on the FRAME to make sure that it
> gets an OnPaint event when it's shown."
> 
> I would say (based on the example in wxVTKRenderWindowInteractor), that:
> 
> "In addition, a SetSize() call should be made on the WIDGET to make sure that it
> gets an OnPaint event when it's shown."

Strange... the sample (as it is now) was tested on XP and Debian, it 
should be fine.  SetSize() on the frame leads to (eventually) an OnPaint 
being invoked on the RWI, which is what we want.

> I've tried a SetSize() on the frame but I get a runtime error with Python...
> Charl, you found this little "bug" on XP, but I think that it is the same on
> Win2000, because I am on a Win2000 machine... Probably I am doing (again)
> something wrong...

Does the NEW wxVTKRWI sample (that I also posted) also generate this error?


-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list