@Alan, Phil

> Now that we have such a widely tested solution, would you be willing
> to write a short summary paragraph concerning the changes in the
> plplotwxwidgets library API?

here it goes. The API really has no visible changes, but has a loss of 
functionality
(use of templates, i.e, ability to do plots other than in wxFrame windows)

"Fixed a bug that happened in test_wxPLplotDemo for  some Linux 
configurations.
 The effect of the bug was a segmentation fault, due to the fact that an 
invalid
plot stream pointer was used. The cause of the stream pointer being invalid
is that the frame window did not initialize in a timely manner. This 
behaviour is a
wxWidgets feature that can or cannot happen in GTK/X11 window systems.
The solution for test_wxPLplotDemo was to initialize the stream in the 
function
Create(), which is done immediatley, instead of doing it on the function 
OnCreate(),
that is called later and executed at an indeterminated time. Note: the 
possiblility and request of creating
the stream in OnCreate() is still present, because this is a feature of the 
driver needed elsewhere.
A side effect of creating the new function Create() for the class 
wxPLplotwindow,
is that the class cannot be a template. At this time the class is descendant 
from
wxFrame, so only wxFrame windows can be created."


> To help you figure out what to say, here is how to discover the
> changes since plplot-5.11.1 in the library API and our demo that links
> with that library:
>
> git diff --ignore-all-space plplot-5.11.1 bindings/wxwidgets/*.h


I did not got back in time this way, because all the other changes were made 
by Phil.

Basically what I did was start with the current master of wxPLplotwindow and

1) override a function Create()
2) do an auxilirary function CreateStream() that contains the code that was 
previously in
OnCreate(). This function is both called by Create() and OnCreate(). A 
boolean
flag assures that is only executed 1 time.
3) Moved the event trigering that was previously on the wxPLplotwindow 
constructor
by ::Connect() calls
to a static event table

This change 3) was not really needed, it was just to reflect the current way 
of handling events

http://docs.wxwidgets.org/3.1/overview_events.html

either by the static event table or by ::Bind()


feel free to change anything in the description.
I did not mention the new debug print option of wxWidgets in cmake,
because you implemented that feature, but that should be mentioned also.


-Pedro






----- Original Message ----- 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
To: "Pedro Vicente" <pedro.vice...@space-research.org>
Cc: "Phil Rosenberg" <p.d.rosenb...@gmail.com>; "PLplot development list" 
<Plplot-devel@lists.sourceforge.net>
Sent: Monday, December 26, 2016 5:09 PM
Subject: Re: [Plplot-devel] Infinite Yielding issue


> On 2016-12-24 20:24-0500 Pedro Vicente wrote:
>
>> Hi Alan
>>
>>> Then collect those two files in a tarball using
>>> tar zcf wxwidgets_experimental_commits2.tar.gz 00*
>>
>> I did the git am as explained, and
>> wxwidgets_experimental_commits2.tar.gz
>> is attached
>>
>> examples/c/x01c -dev wxwidgets
>> and
>> test_wxPLplotDemo
>>
>> run with no problems on all my tests
>>
>
> Hi Pedro:
>
> Thanks very much for that compiler warning fix and big testing effort
> on a Windows platform and 4 Linux platforms for this latest iteration
> of your two-commit fix.
>
> I tested this latest version here in the same way I did the previous
> iteration, and all was well.
>
> Now that we have such a widely tested solution, would you be willing
> to write a short summary paragraph concerning the changes in the
> plplotwxwidgets library API?  I cannot write such a summary myself
> because I don't know the correct C++ terminology to use.
>
> That summary would likely help Phil make up his mind about whether we
> will adopt your latest iteration of the fix or try something else.
> However, please write that paragraph with a somewhat larger audience in 
> mind
> than just Phil.  Because if he decides to go with your fix, then I
> will want to include your summary paragraph in our release notes to
> aid those (like you and Greg Jung) who are developing their own
> applications and libraries that link with the plplotwxwidgets library
> and who will therefore have to change those applications and libraries
> to be compatible with our changes.  So the summary should answer the
> question what is the minimum that an outside developer need to know about 
> the
> the changes to the plplotwxwidgets library API?
>
> To help you figure out what to say, here is how to discover the
> changes since plplot-5.11.1 in the library API and our demo that links
> with that library:
>
> git diff --ignore-all-space plplot-5.11.1 bindings/wxwidgets/*.h
>
> git diff --ignore-all-space plplot-5.11.1 examples/c++/wxPLplotDemo.cpp
>
> Obviously, the extra include to allow for the possibility of debugging
> output in bindings/wxwidgets/wxPLplotstream.h is not an API change,
> but it looks like there have been substantial backwards-incompatible
> changes in the plplotwxwidgets library API as indicated by
> the changes in bindings/wxwidgets/wxPLplotwindow.h.
>
> Those API changes appear also to be confirmed by that second git diff
> result above (although some of those changes were an addition of a
> locate mode and nothing to do with API changes so your summary doesn't
> need to mention that locate mode addition).
>
> 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
> __________________________
> 


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