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-Thread: 103376,eafb0c0f59b030c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s72.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Event mechanisms for GUI's References: <1159291684.625821.216400@h48g2000cwc.googlegroups.com> In-Reply-To: <1159291684.625821.216400@h48g2000cwc.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <3egSg.208528$1i1.141541@attbi_s72> NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s72 1159303167 12.201.97.213 (Tue, 26 Sep 2006 20:39:27 GMT) NNTP-Posting-Date: Tue, 26 Sep 2006 20:39:27 GMT Date: Tue, 26 Sep 2006 20:39:27 GMT Xref: g2news2.google.com comp.lang.ada:6760 Date: 2006-09-26T20:39:27+00:00 List-Id: Lucretia wrote: > > I'm currently thinking of the event handling mechanism, I started to > think about using the listener/subject pattern, but then started to > wonder about the alternatives: The best way is to have a protected event queue for each window. There should be mechanisms to specify what events are and are not put on the queue, and for combining the queues for multiple windows into one queue. > This would be painful as there'd be a lot of case statements. There's nothing wrong with case statements. They're very clear and easy to read and understand. Remember Ada's explicit design goal: "[E]mphasis was placed on program readability over ease of writing." [ARM Introduction] If you have a problem with writing case statements, then you probably haven't adopted The Ada Way yet. -- Jeff Carter "My mind is aglow with whirling, transient nodes of thought, careening through a cosmic vapor of invention." Blazing Saddles 85