@Alan, Phil

However, there is something we could try, which is,
keep the current way of wxPLplotwindow beging a template,
and at the same time overriding the Create() function (with template).

ok, I implemented this, attached

this

1) will not break current template use
2) will fix the bug

Limitation:
template can only be used with wxFrame (or a class that implements Create() with the same
signature)

test demo and example 01 run OK in CentOS, output is below



14:42:47: Debug: wxPLplotwindow::wxPLplotwindow
14:42:47: Debug: wxPLplotwindow::Create()
14:42:47: Debug: wxPLplotwindow::CreateStream()
14:42:47: Debug: plD_init_wxwidgets(): enter
14:42:47: Debug: wxPLDevice(): enter
14:42:47: Debug: wxPLDevice(): gc done
14:42:47: Debug: wxPLDevice(): m_interactiveTextGcdc done
14:42:47: Debug: wxPLDevice(): SetDC done
14:42:47: Debug: wxPLDevice(): leave
14:42:47: Debug: plD_init_wxwidgets(): leave
14:42:47: Debug: frame->Create
14:42:47: Debug: Plot()
14:42:48: Debug: wxPLplotwindow::OnCreate
14:42:48: Debug: wxPLplotwindow::CreateStream()



On 2016-12-27 12:58, Alan W. Irwin wrote:
On 2016-12-27 10:09-0500 Pedro Vicente wrote:

@Alan

Isn't that loss of functionality by definition a backwards
incompatibility in the API for the plplotwxwidgets library?

yes

but for the current (5.11.1) release compared to the new implemented examples,
the effect is the same

previously the way to start the demo was

wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>();

and now is

wxPLplotwindow *frame = new wxPLplotwindow();

and because wxPLplotwindow is a child of a wxFrame,
the visible effect is exactly the same, a frame window that shows a plot.

@Pedro:

Thanks for that clarification.  So if users stick with the old way of
creating frame they will get a build error (which I assume is the
reason why Laurent is now getting build errors with his own code that
links to the plplotwxwidgets library).  I do not say that in a
critical way since if the choices are unreliability on some platforms
versus changing our API in a backwards-incompatible way, then we must
take the latter choice.

@Phil:

Do you agree with Pedro there is no obvious way out of this choice? If
so, then so be it, but we do have to warn users in the release notes
of this backwards-incompatible change.

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/

Attachment: 0001-Add-function-Create.patch.tar.gz
Description: Binary data

------------------------------------------------------------------------------
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

Reply via email to