Hi Pedro Ah, I had assumed that the OnCreate event was not being triggered at all. I now understand what is happening. Or at least I think I do ;-) Actually now you have pointed out the issue I am surprised the code works on any platform.
The error is in the wxplplotdemo code, not in the wxplplotwindow. In the demo we must simply wait for the OnCreate message to arrive and be processed before we grab the stream in Plot(). We may be able to do that with while(!m_created) wxYield(); Could you try the above instead of your overloaded Show() fix please? You can check out an older version of Plplot by using git checkout 3cccca6a49a572e7aa518a5b8a6bbecd9ef1f812 which will have your debug code in, but not your Show() fix. Unfortunately, although your fix does work for the example as it is written, it will not work in general. This is because there is no requirement to call Show() immediately after window creation. I am sorry that I have not been able to go through this in huge detail with you as fast as I would have liked. I have rather a lot on at work and I'm sure you understand I have to give that priority. Phil On 16 December 2016 at 18:01, Pedro Vicente <pedro.vice...@space-research.org> wrote: > Hi Phil, Alan > > I tried evtCreateExample.cpp and I get the good expected result. > This just means that for this simple example the OnCreate event is > triggered. > > To note that on my bad results of the PLplot demo, the OnCreate event is > *also* triggered. > the problem is that is triggered after the plot was made > > > 11:09:13: Debug: wxPLplotwindow::wxPLplotwindow > 11:09:13: Debug: frame->Create > 11:09:13: Debug: pls NULL > 11:09:13: Debug: wxPLplotwindow::OnCreate > > I am not that familiar with the wxWidgets internals but it seems events are > put in a queue. > > http://docs.wxwidgets.org/3.1/overview_events.html > > it could be that the event is not processed in the expected order or delayed > for some reason. > this could be a good question for the wxWidgets support list. > > -Pedro > > > > On 2016-12-15 21:11, Alan W. Irwin wrote: >> >> On 2016-12-16 01:05-0000 Phil Rosenberg wrote: >> >>> Hmm - well another theory down in smoke. >>> >>> Attached is an absolute minimum example of the use of wxEVT_CREATE. On >>> Windows I get the expected behaviour of a popup dialog appearing >>> before the frame saying "OnCreate called." >>> >>> Could you try it on one of your Linux machines? I'm afraid it's way >>> past my bedtime here in the UK, so I'll have to continue tomorrow. >> >> >> @Pedro: You should do this test as well since your Linux platforms >> are the ones where >> (so far at least) issues are showing up. But for what it is worth, I >> did the following >> >> irwin@raven> g++ $(wx-config --cppflags --libs) evtCreateExample.cpp >> >> to successfully (no errors/warnings) build Phil's test application. >> >> Then I ran it with >> >> irwin@raven> ./a.out >> >> and a popup window came up (apparently as a subGUI of a grey GUI blank >> called "My Frame") with the "OnCreate Called" message displayed (which >> I understand was the expected result when everything is working >> properly). >> >> I hope that experiment helps you guys to gain some insight in what the >> heck is going on for wxwidgets-gtk+ on Linux. >> >> Alan >> __________________________ >> Alan W. Irwin >> >> Astronomical 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 >> __________________________ > > > -- > Pedro Vicente > pedro.vice...@space-research.org > http://www.space-research.org/ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel