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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: T'Interface attribute Date: Fri, 11 Aug 2017 15:49:46 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Fri, 11 Aug 2017 20:49:46 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="26552"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: news.eternal-september.org comp.lang.ada:47713 Date: 2017-08-11T15:49:46-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:omjkds$1lob$1@gioia.aioe.org... > On 2017-08-11 02:33, Randy Brukardt wrote: ... >> So, I don't see that interfaces or even multiple inheritance really buys >> much here. > > It adds type safety. It a quite frequent error in GUI design to write a > handler for an event that never comes. That hasn't happened to me much, probably because the specific handlers are typed (most of the handlers I've needed are edit restrictions or handling buttons). Besides, constructing this sort of code is too tedious. I generally use the Claw Builder to make the outline of the code (which includes the handlers) and manually fill in the details. > Then it allows typed arguments in the event handler. In Windows everything > is LPARAM, same in Gtk. Yes, but that is only true in the general handler; all of the specific handlers are properly typed. Hopefully, no one will actually have to use the general handler - it's there just in case something Claw doesn't consider needs to be done. > When using GtkAda it makes a huge difference. GtkAda defines some typed > handlers, but not all. When you get hit by necessity to extract marshaled > signal arguments and convert them to the designated types manually you > thank GtkAda for all cases when you don't have to. Right. Sounds like using Claw. Randy.