comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: GTK and tasking (GNAT)
Date: Mon, 5 May 2014 09:33:46 +0200
Date: 2014-05-05T09:33:46+02:00	[thread overview]
Message-ID: <4cd15djcr82g$.1kb4o3rixd5oo$.dlg@40tude.net> (raw)
In-Reply-To: bsnpvuFcplU1@mid.individual.net

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.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  parent reply	other threads:[~2014-05-05  7:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-03 20:30 GTK and tasking (GNAT) hreba
2014-05-03 21:23 ` Simon Wright
2014-05-04 18:10   ` hreba
2014-05-04 18:29     ` Simon Wright
2014-05-04 22:10   ` hreba
2014-05-04  7:31 ` Dmitry A. Kazakov
2014-05-04 18:36   ` hreba
2014-05-04 19:26     ` Dmitry A. Kazakov
2014-05-04 20:40       ` hreba
2014-05-04 21:07         ` Shark8
2014-05-04 21:32           ` hreba
2014-05-04 21:44             ` Shark8
2014-05-04 21:57               ` hreba
2014-05-05  7:33             ` Dmitry A. Kazakov [this message]
2014-05-06 12:43               ` hreba
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox