comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Periodic screen update using GWindows/GNAT?
Date: 24 May 2002 12:59:54 -0400
Date: 2002-05-24T17:06:48+00:00	[thread overview]
Message-ID: <uhekxmqgl.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: 8cd144a2.0205231431.6524993@posting.google.com

ddave83@hotmail.com (D) writes:

> My environment is NT/GNAT/GWindows.
> 
> I can't quite figure out how to update a window asynchronously (i.e.
> in a non-event driven way). I need to have a display in a window
> update regularly, without the user doing anything. How do I do this
> after I've called GWindows.Application.Message_Loop?

I don't know how to do this in detail since I don't use GWindows, but
the canonical Windows approach is to create a timer, have it send your
window timer messages, and do the regular updates in the timer message
handler.

The Ada way is to use a separate task to do computations for the
regular updates, and pass the results to the window in a task-safe
way. If the computations are time-consuming, this is worth it
(assuming GWindows provides task-safe inter-window communications). If
the computations are fast, it is not worth it.

-- 
-- Stephe



  parent reply	other threads:[~2002-05-24 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-23 22:31 Periodic screen update using GWindows/GNAT? D
2002-05-24  1:46 ` Randy Brukardt
2002-05-24 17:27   ` David Botton
2002-05-24 16:59 ` Stephen Leake [this message]
2002-05-24 17:20 ` David Botton
replies disabled

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