On 2017-03-03 16:02-0000 Phil Rosenberg wrote:

> Hi Alan
> Sorry for not replying sooner. I was waiting until I had time to
> actually read the code, which unfortunately I haven't had chance to do
> still, but I didn't want to leave it any longer without at least
> guessing what might be happening.

Hi Phil:

Your guesses are quite helpful so keep them coming.  :-)

>
> So a couple of things spring to mind. Firstly you must at some point
> renter the event loop to allow the viewer to start doing stuff again.
> If you are sat in a loop in you communication code just waiting for
> something to happen then it never will because the execution point is
> in your communication code and not dealing with the mouse pointer.
> calling wxYield will go check the event loop, deal with that stuff
> then return, but it's often not the best solution because nested calls
> to wxYield aren't permitted. If possible it is better to return from
> your function and use some other event to trigger your return
> communication. Perhaps this could be at the end of the method that
> deals with capturing mouse activity.
>
> Another thing is that to cause the plot to be redrawn you must tell
> wxWidgets that there is something new to draw. I think the method for
> this is Refresh(). Then you must allow the event loop to be entered to
> allow the redraw to actually take place.
>
> A final thing to think about is that locate must be dealt with
> immediately. It sounded like you were holding locate requests and
> continuing to send plot commands. But maybe I misunderstood this as
> doing so would hang the plplot side while pllocate awaited it's
> return.
>
> As I said I haven't looked at the code, just read your email, but
> these are the first places to look as a guess.
>
> Also there is a debug #define which when used means that plplot does
> not launch the viewer, instead it just sits and waits for you to
> launch it manually. This way you can launch the viewer in a debugger
> to see what is going on in there.

Thanks, for those ideas which I haven't completely absorbed yet, but
I will look closely at them later.  The reason for putting that off
is there is a new surprising result I have established which is
even for -DPL_WXWIDGETS_IPC2=OFF

examples/c/x01c -dev wxwidgets -locate

does not work correctly, i.e., there is no display of the plot until
after you have clicked the mouse away from where you guess a viewport
will appear.  So the net result is locate mode must be finished before
the plot can appear.  So it was this code I was trying to follow for
the -DPL_WXWIDGETS_IPC2=ON case, but that is obviously not a good
model to follow.

(By the way, I would not advise working on that
-DPL_WXWIDGETS_IPC2=OFF issue because there is a good possibility
(assuming you like everything about the new -DPL_WXWIDGETS_IPC2=ON
approach once you have had a chance to look at it) that the
-DPL_WXWIDGETS_IPC2=OFF code will be completely removed once I get
-DPL_WXWIDGETS_IPC2=ON working for this example.)

Just now I tried the third (deprecated) version of the wxwidgets code
using -DOLD_WXWIDGETS=ON, and that works fine with the above example
with both mouse clicks and key presses being properly reported. 
Therefore, I have a lot of hope that a deeper look into that deprecated
code will give me a model I can follow to get the above example to
work correctly with -DPL_WXWIDGETS_IPC2=ON.

So please remain ready to answer questions this weekend just in case I
need some further help to try and translate how that deprecated code
implements interactivity to the -DPL_WXWIDGETS_IPC2=ON case.

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