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-23 18:46:23 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Periodic screen update using GWindows/GNAT? Date: Thu, 23 May 2002 20:46:23 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <8cd144a2.0205231431.6524993@posting.google.com> X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:24615 Date: 2002-05-23T20:46:23-05:00 List-Id: D wrote in message <8cd144a2.0205231431.6524993@posting.google.com>... >I'm new to Windows programming. > >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? > >Thanks! Well, this is easy in Claw, because Claw is task safe. Just create a task to do the display update, give the task a copy of the window to write to, and write to the window as needed. The event loop is a separate task, so you don't need to worry about it, and it doesn't block the window updating. There is an example of doing that with Claw (look at Adtest). I don't believe GWindows is task-safe. (I'm sure David will correct me if I'm wrong here...) That means that only a single task can write to the windows, so you can't use the tasking solution (at least not without standing on your head). The Claw introductory edition is available for free under the GMGPL, see http://www.rrsoftware.com/ for the download. (The license doesn't match the GMGPL, that will get updated with the next update of the Introductory edition; don't worry about that...) Randy Brukardt R.R. Software, Inc.