[vtkusers] Cocoa, Python, VTK and wx embedded window problems

Dan White white at mpi-cbg.de
Thu Oct 16 08:52:09 EDT 2008


Dear John,

look at the source code from bioimagexd
www.bioimagexd.net

and you can see how we do it (no magic involved i think,
Kalle, Lassi, any hints?)

we are using python, wxPython, python wrapped VTK (Carbon)
works great for us, with mouse interactions etc. in the display window.
Maybe there are some OSX specific hacks...

you can not really use cocoa yet with wxPython, because the
Cocoa port of wxWidgets (wxCocoa) is not mature enough...
its not release in the binary release of wxPython i think.

... i wish it was because if it was we could make a 64 bit version of  
BioImageXD for OSX.
Carbon GUI are limited to 32 bit, and Carbon will be depreciated some  
time....

I'd like to get to know someone who has time an interest to work on  
the wxCocoa
port of wxWidgets.... there are several projects that would benefit  
from that...

On Oct 16, 2008, at 1:53 PM, vtkusers-request at vtk.org wrote:

>
> Message: 10
> Date: Wed, 15 Oct 2008 22:42:13 +0200
> From: John Donker <j.h.donker at home.nl>
> Subject: [vtkusers] Cocoa, Python, VTK and wx embedded window problems
> To: vtkusers at vtk.org
> Message-ID: <D17430C3-5462-4EAB-8FB2-02E71D31D239 at home.nl>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> Hi,
>
> I am working  on a project that is using VTK with wxWidgets and
> Python. And on OS X (10.5) something very strange happens. When I try
> to embed the VTK window (like in the example wxvtkWindowRender.py in
> wrapping/python/vtk/wx) I get two windows of the same size. One
> displays the VTK openGL output and the other responds to events.  The
> openGL output responds correctly, except that it's rendering in a
> different window.
>
> The same python code works on Windows Vista without any problems. In
> the terminal some messages appear that the window can't be remapped
> because it's unsupported.  A quick check in the headers confirms this.
> But I have seen embedded VTK windows in other apps so this unlikely.
> Since I have very limited experience with OpenGL and Cocoa I don't
> really have an idea where to look to solve this problem.
>
> I am compiling from the command-line with shared_libs, python_wrapping
> and cocoa.  Is this a known bug?
>
> Sincerely,
>
> John Donker

Dr. Daniel James White BSc. (Hons.) PhD
Senior Microscopist / Image Processing and Analysis
Light Microscopy Facility
Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstrasse 108
01307 DRESDEN
Germany


New Mobile Number!!!

+49 (0)15114966933 (German Mobile)
+49  (0)351 210 2627 (Work phone at MPI-CBG)
+49  (0)351 210 1078 (Fax MPI-CBG LMF)

http://www.bioimagexd.net
http://www.chalkie.org.uk
dan at chalkie.org.uk
( white at mpi-cbg.de )








More information about the vtkusers mailing list