Open hughesadam87 opened 9 years ago
Just wanted to update that wxPython < 2.8.12 cannot be installed on OS with python 2.7 or higher, so it's actually impossible to use 2.8.10 unless you're on an old OS like Ubuntu 10.04.
@corranwebster @rkern
Robert, Corran,
Wanted to CC you on this issue as I figured you two might have already encountered the buggy WX > 2.8 views in certain traitsui applications (http://stackoverflow.com/questions/27790572/traitsui-buggy-view-depending-on-os). Has either of you encountered such blacking-out in a wx-backed TraitsUI app in the past? It doesn't happen for all traitsui programs, but my farily complex simulation program does exhibit this. I haven't been able to find a way to reproduce it in smaller examples yet.
I vaguely remember seeing something like that under Wx on Ubuntu 4 or 5 years ago now, but it was second-hand: it was another developer at Enthought who was experiencing the problem. My recollection was that it was related to TraitsUI (or Enable, or similar) getting the wrong background color from Wx. I thought it had been fixed, but it is possible that the fix was a work-around of a bug in Wx which has now been resolved and the work-around is now a problem.
The other possibility is that we have run into problems with TraitsUI and Wx when dealing with complex and deeply nested UI layouts: TraitsUI can end up generating a lot of panels within panels to the point where Wx itself starts having difficulties and eventually the innermost UI components can start behaving strangely. If I had a suggestion to help you replicate this it would be to create Groups within Groups within Groups until something weird happens.
You may find that simply adjusting your UI design to be less complex resolves at least some of the issues.
We're mainly using Qt these days so if I had an over-all suggestion it would be to use the Qt backend, and work on fixing the issues there: the issues with the TableEditor are likely simply that the Qt backend's implementation is only partial compared to the Wx implementation, but since that's a known issue it's easy to diagnose (if not entirely trivial to fix :) ) compared to delving into the depths of the interactions between Wx and TraitsUI, particularly with hard-to-replicate bugs.
Thanks Corran. If you remember anything else about the problem, please let me know. I can tell you that it's happening on Mac and Ubuntu now, and only goes away when using wx < 2.8 (which is very hard to install on modern Ubuntu dists.)
We'd be fine with QT, except there are a number of differences where WX just looks better. Here are what we observed in our program:
At this point, considering how deep the WX issues may be, these don't seem like as much of a problem as I had initially thought.
PS, how's the family life treating you?
Hi,
@jdmarch (CCing you as followup to the Stack Overflow thread a few weeks ago)
We're using a fairly complex TraitsUI (4.4.0) GUI and have found that in versions of WX 2.8.12 and higher, including WX 3.X, the view does not render correctly. Some screenshots and my initial post of this issue on stack:
http://stackoverflow.com/questions/27790572/traitsui-buggy-view-depending-on-os
We've confirmed it works on wx 2.8.10 from my old laptop that had that version by default. Unfortunately, it's very difficult to build WX 2.10 on ubuntu now, especially in a virtual env. All the old solutions I've found so far have failed, and even symbolic linking my system python isn't helpful because
apt-get install
now installs 2.8.12.Setting the backend to QT works, but it has several issues (I'm using pyqt=4.10.4). First, we have lists shown in a Table Editor which show no default selected item, even though the program initiates with a selection. In addition, table items are not being sorted correctly. The ValueEditor colors are much nicer in wx than in qt (I can provide screenshot if helpful), etc... We've confirmed that all of the issues are resolved when we switch to wx2.8.10 on my laptop.
Therefore, my program as-is has view bugs and looks sloppier in QT than in wx 2.10, but in other versions of wx, it renders awfully as show in link above. These bugs will lead users to inevitable mistakes, for example thinking no entry is selected in a table, when it actually is and it's just not showing up on the initial view and so forth. Here are all my packages: