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,e429176c9adb07b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-17 11:31:50 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc02.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: [OT] Best way to isolate a GUI? References: <3E5121BD.4010200@cogeco.ca> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc02 1045510309 12.234.13.56 (Mon, 17 Feb 2003 19:31:49 GMT) NNTP-Posting-Date: Mon, 17 Feb 2003 19:31:49 GMT Organization: AT&T Broadband Date: Mon, 17 Feb 2003 19:31:49 GMT Xref: archiver1.google.com comp.lang.ada:34175 Date: 2003-02-17T19:31:49+00:00 List-Id: > > Callbacks are an excellent example of a tool's limitations affecting the > > users' way of thinking (everything looking like a nail if you only have > > a hammer). >... > I can't speak for CLAW, Claw handles window event callbacks by calling tagged object procedures, which may be overridden by the app program. It's all type-checked etc Ada. It's like writing all your code inside interrupt handlers. But an app that isn't basically a set of event responders can be done differently. One of the Claw demo programs, Bigjob, has a main task that just does a (dummy) big computation, and a separate windows' event handler task. The windows routines put user command stuff into a message and the computation task periodically checks there to see if it needs to modify its computation. Similarly, the computation task periodically puts results in a status record. The window task inspects that and updates the display as needed. In the Bigjob example, if the main task wants to force an immediate screen update, it simply invalidates the window, which forces a redraw, which will use the updated status info.