From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: hreba Newsgroups: comp.lang.ada Subject: Re: GTK and tasking (GNAT) Date: Tue, 06 May 2014 09:43:06 -0300 Message-ID: References: <1db3ntu987ypk$.6zu9ghm9azm0.dlg@40tude.net> <14ydfwlh6wfe4$.1rv26jm958z.dlg@40tude.net> <4cd15djcr82g$.1kb4o3rixd5oo$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Y/cOqzhYrvNtmkdjFRr4Pw4MCyAfL/5a8NVS6hQoi8+7MdXrya Cancel-Lock: sha1:Uv+n547DUngbzy6ObKzmgTenn7M= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <4cd15djcr82g$.1kb4o3rixd5oo$.dlg@40tude.net> Xref: news.eternal-september.org comp.lang.ada:19712 Date: 2014-05-06T09:43:06-03:00 List-Id: On 05/05/2014 04:33 AM, Dmitry A. Kazakov wrote: > On Sun, 04 May 2014 18:32:45 -0300, hreba wrote: > >> I am talking about calculations that can be broken down, as in my >> example at the beginning of this thread: I count from 1 to 10, update a >> text box and call delay at each iteration, but the display changes only >> after the termination of the loop. > > You can find an example of how to do this in GtkAda here: > > http://www.dmitry-kazakov.de/ada/aicwl.htm#12.6 > > The example performs a very lengthy calculation in an independent task and > among other updates a progress bar. > > The method is still the one I described. > > http://www.dmitry-kazakov.de/ada/gtkada_contributions.htm#1 > > You post data (e.g. the bar position) to the main loop from where the > action is performed. > > So the plotter in the example is based on this technique as well. Its > refresh engine, which periodically updates the curves, is an Ada task that > posts Queue_Draw to the main loop. > > There is no simple way of doing tasking in GUI. > Thanks a lot for the wealth of information. -- Frank Hrebabetzky +55 / 48 / 3235 1106 Florianopolis, Brazil