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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b4cf0ad6702f7c2c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-24 10:03:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Periodic screen update using GWindows/GNAT? Date: 24 May 2002 12:59:54 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <8cd144a2.0205231431.6524993@posting.google.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1022260007 7245 128.183.220.71 (24 May 2002 17:06:48 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 24 May 2002 17:06:48 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:24658 Date: 2002-05-24T17:06:48+00:00 List-Id: 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