From: Matt N. <new...@ca...> - 2005-04-11 15:13:19
|
John, > It appears the cause of this problem is that the wxapp must be > created before the wxPanel is init'ed. The solution is to put > the wxapp creation in new_figure_manager, not show, so that > the app will be created before the wxpanel. This appears to > work. Here is what I am currently doing Yep, I think this is exactly the problem (though I could never reproduce it), and, like you say, creating wxapp in new_figure_manager() sounds like the right solution to me. I think this was part of the discussion with Marcin W. a month ago, no?? Anyway, in backend_tkagg (the closest analogy I'm familar with), Tk.Tk() is created in new_figure_manager. It seems that with other windowing systems, it's ok to create the mainApp (ie, who will run the event loop) if needed in show()??? Perhaps it would make sense to have this be more uniform across the different backends? Thanks, --Matt |