google-code-export / visvis

Automatically exported from code.google.com/p/visvis
Other
1 stars 1 forks source link

Blank window with WX 2.9 #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install wx 2.9
2. Start plotting.py
3.

What is the expected output? What do you see instead?

Got a blank window

What version of the product are you using? On what operating system?

latest git version.

Please provide any additional information below.

OSX Lion, wx 2.9.1 (compiled)

Original issue reported on code.google.com by Nicolas.Rougier@gmail.com on 24 Aug 2012 at 2:00

GoogleCodeExporter commented 9 years ago
I cannot test this unless I compile wx myself, so I'll try to give some 
pointers...

Since we tested at EuroScipy that a normal hello world did work, it is likely 
related to how visvis uses wx. Probably due to something that was changed in wx 
2.9. 

I suspect the problem to be related to how visvis "hijacks" the wx eventloop to 
process GUI events. This code is concentrated in visvis/backends/backend_wx.py 
and maybe a bit in visvis/core/baseFigure.py. I particularly suspect the 
_ProcessEvents method in the App class at the bottom of backend_wx.py.

Comparing the documentation of wx 2.8 and 2.9, it seems that the xw.EventLoop 
class is replaced with an EventLoopBase and a GuiEventLoop class. It seems that 
the way to create an eventloop object and how to activate them has changed as 
well.

Also, the App instance does not seem to have the ProcessIdle method that the 
PySimpleApp in 2.8 did have; this is now in EventLoopBase.ProcessIdle.

Check this link for the 2.9 docs: 
http://downloads.sourceforge.net/wxpython/wxPython-docs-2.9.4.0.tar.bz2

Original comment by almar.klein@gmail.com on 27 Aug 2012 at 12:09

GoogleCodeExporter commented 9 years ago
On Windows 7, while the 1.7 version displayed only a blank window, the latest 
tip version displays content in a wx backend. The solution was to create the 
context in the __init__. Could this be important enough to release a new 
version? Thanks!

Original comment by matti.pi...@gmail.com on 29 Nov 2012 at 4:57

GoogleCodeExporter commented 9 years ago
The code for wx has not changed much since 1.7. But maybe it was accidentally 
fixed with the threading-stuff that Robert did.

> The solution was to create the context in the __init__.

What do you mean by that? Did you need to change the visvis source code to make 
it work, or your own code?

If it works now, I suppose it would help wx-users a lot if we bring out a 1.8 
or 1.7.1.

Original comment by almar.klein@gmail.com on 29 Nov 2012 at 7:45

GoogleCodeExporter commented 9 years ago
No change here. I just made a pull and still got the blank window.

Original comment by Nicolas.Rougier@gmail.com on 11 Dec 2012 at 1:07

GoogleCodeExporter commented 9 years ago
almar, sorry, please ignore my comments. Both v1.7 and tip work for me now, I 
have a laptop with two graphics chips and needed to tell the OS to use the 
NVidia one in order to see OpenGL graphics. Basically, I added noise and no 
content to this discussion, sorry.
Thanks for a nice framework.
Matti

Original comment by matti.pi...@gmail.com on 11 Dec 2012 at 5:32