On Sun, Jul 27, 2008 at 12:28 PM, John Hunter <[EMAIL PROTECTED]> > [ginput_manual_clabel] doesn't appear to be working for me. To keep things > simple, I am > working with backend_wx so there are no issues of diamond inheritance. > It just appears that the specialization is broken. I get this > endless loop when I try to run the demo
I didn't test with multiple calls to ginput. Apparently I can't reuse the wx EventLoop. I posted a fix to backend_wx which creates a new event loop each time, and now it works for me on wx-2.8.3 for macos 10.4. > On a separate note, I also see the strangeness you are seeing with the > multiple inheritance order. When I run the example with backend > wxagg, I get the wx specialization called even though FigureCanvasAgg > is defined first in the multiple inheritance heirarchy and so the base > method should be picked up. And yet when I try and replicate this in > test code, I always get the base class method ... Looks like we've > got some work to do to sort all of this out. My inclination is to avoid diamond inheritance in this case by moving the wx base class to wxagg. Let me know and I will implement it. It would be helpful to run through the tests for wx on linux and on windows before a release. Particularly ginput_manual_clabel for start/stop event loop. I can't think of how to test for draw_idle short of putting a print statement in the window, or using a complicated plot like multi_image and continuously resizing the window. There is one more outstanding change to wx before I can stop subclassing the WxAgg canvas in my own applications, which is that draw is being called too often. Putting a print statement in WxAgg draw and _onPaint I get the following: $ python mri_demo.py wxPaintEvt WxAgg draw WxAgg draw wxPaintEvt WxAgg draw WxAgg draw <image finally shown on screen; click close button> wxPaintEvt WxAgg draw wxPaintEvt WxAgg draw By contrast TkAgg shows: $ python mri_demo.py tk draw I don't have a patch for this ready, though I can get it down to two draws by putting a draw_idle in _onPaint. I'll hold off committing until I get it down to one. - Paul ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel