help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Catching Figure close button - callbacks not running?


From: pavel
Subject: Re: Catching Figure close button - callbacks not running?
Date: Fri, 1 Feb 2019 22:15:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1


Dne 01. 02. 19 v 15:41 Pantxo Diribarne napsal(a):

I never used the parallel package but I was under the impression that it was mainly a parallel implementation of (par)arrayfun, (par)cellfun ... And I am pretty sure you cannot affect the state of the figure, which lives in the main process, by calling those functions.


Pantxo, thanks a lot for your insight. In the end I wrote a simple scheduler which stores current position of every callback at each schedPause call and when the time is up, it returns back to the callback at requested position. The callback code is still relatively legible and understandable

Before scheduling, using pause(): https://github.com/pavhofman/nonlinear-compensation/blob/3aec0c676ab3218b78bce52c43409821387842dc/octave/ctrl/clbkCalibrateFreqs.m

After scheduling, using schedPause, with code split into switch blocks: https://github.com/pavhofman/nonlinear-compensation/blob/master/octave/ctrl/calibrateFreqsSched.m

I know it is ugly but seems to work OK.

Thanks for your patience.

Regards,

Pavel.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]