Alan, Phil I went ahead and did a patch commit for option 3), attached, that has this:
(note: I wrote the code in Windows, then ftp to Linux, I got some warnings about line endings, just do
dos2unix if any thing shows up) Subject: [PATCH] wxwidgets binding: fix for delayed OnCreate eventThe delayed call of the create event (OnCreate()) on wxApp::OnInit() is a wxWidgets feature.
To avoid that, the fix is to remove the event creation completely, and instead override Create(). For this to happen, the wxPLplotwindow class cannot be templated. Other changes are that events are now handled by a static event table, using wxDECLARE_EVENT_TABLE(). An auxiliary function CreateStream() creates the stream in Create(). The code of wxPLplotwindow was moved to a new source file wxPLplotwindow.cpp Tested by: Pedro Vicente <pedro.vice...@rhw9121.star1.nesdis.noaa.gov> on Ubuntu Linux 16.04 with wxwidgets3.0 package installed. Results from building the test_wxPLplotDemo target: 01:06:35: Debug: wxPLplotwindow::wxPLplotwindow 01:06:35: Debug: wxPLplotwindow::Create() 01:06:35: Debug: wxPLplotwindow::CreateFrame() 01:06:35: Debug: plD_init_wxwidgets(): enter 01:06:35: Debug: wxPLDevice(): enter 01:06:35: Debug: wxPLDevice(): gc done 01:06:35: Debug: wxPLDevice(): m_interactiveTextGcdc done 01:06:35: Debug: wxPLDevice(): SetDC done 01:06:35: Debug: wxPLDevice(): leave 01:06:35: Debug: plD_init_wxwidgets(): leave 01:06:35: Debug: frame->Create 01:06:35: Debug: Plot() NOTE: previous to the creation of Create(), the same code was tested using the event creation of OnCreate(): the error still happens in this case 00:48:12: Debug: wxPLplotwindow::wxPLplotwindow 00:48:12: Debug: frame->Create 00:48:12: Debug: Plot() FALSE IsReady() 00:48:12: Debug: wxPLplotwindow::OnCreate 00:48:12: Debug: plD_init_wxwidgets(): enter 00:48:12: Debug: wxPLDevice(): enter 00:48:12: Debug: wxPLDevice(): gc done 00:48:12: Debug: wxPLDevice(): m_interactiveTextGcdc done 00:48:12: Debug: wxPLDevice(): SetDC done 00:48:12: Debug: wxPLDevice(): leave 00:48:12: Debug: plD_init_wxwidgets(): leave----- Original Message ----- From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca> To: "Pedro Vicente" <pedro.vice...@space-research.org>; "Phil Rosenberg" <p.d.rosenb...@gmail.com>; "PLplot development list" <Plplot-devel@lists.sourceforge.net>
Sent: Thursday, December 22, 2016 11:05 PM Subject: Re: [Plplot-devel] Infinite Yielding issue
Hi Pedro: On 2016-12-22 18:34-0500 Pedro Vicente wrote:@Alan[...][The wxwidgets developer] says we cannot expect a timely response from the "create" event in wxApp::OnInit(),which is the way wxPLplotDemo has. so, we have to change that, it just cannot be like it is now.Good point!@Phil [Three] optionsYour ideas for fixing this issue are rightly directed to Phil because I don't have much expertise to help you in this area. Therefore, I will confine what I say in response tojust one issue with case 3 that you brought up.But [option 3] would probably break existing applications.but at the moment this is the only solution that we know has no potencial issues.I don't think we should be too concerned with breaking applications since Phil's wxwidgets approach is still pretty new and experimental, and it was breaking them in any case as you have been demonstrating. :-) I am not tuned in to wxwidgets very much, but I never heard of anyone using the old plplotwxwidgets library for anything. And the only use of Phil's new plplotwxwidgets library I have heard of up to this point is your use and Greg Jung's use. In his case he used that library as a means of getting the GDL (Gnu Data Language) project (see <https://en.wikipedia.org/wiki/GNU_Data_Language> to provide PLplot-generated plots on Windows. But I am pretty sure his approach was a private experiment and is not an official part of GDL. So I suspect that it is just you and Greg that we would be inconveniencing here, but I assume both of you would be happy to accept that inconvenience if the result was that from then on you were building your apps and libraries on top of a plplotwxwidgets library that was rock solid. It sounds like case 3 is the only rock-solid solution we have up to now so my naive vote would be for that solution unless Phil comes up with a different rock-solid solution that he prefers. So please thrash it out between you, and I look forward to the decision you two make and the implementation that will quickly follow that decision about the best way to fix this issue in a fundamental way. Alan __________________________ Alan W. IrwinAstronomical research affiliation with Department of Physics and Astronomy,University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________
0001-wxwidgets-binding-fix-for-delayed-OnCreate-event.patch.tar.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel
_______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel