comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: T'Interface attribute
Date: Fri, 11 Aug 2017 15:49:46 -0500
Date: 2017-08-11T15:49:46-05:00	[thread overview]
Message-ID: <oml59a$pto$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: omjkds$1lob$1@gioia.aioe.org

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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.



  reply	other threads:[~2017-08-11 20:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02 13:43 T'Interface attribute Dmitry A. Kazakov
2017-08-02 14:23 ` Eryndlia Mavourneen
2017-08-03 12:52   ` Dmitry A. Kazakov
2017-08-03  4:46 ` Randy Brukardt
2017-08-03  7:26   ` Dmitry A. Kazakov
2017-08-04 23:51     ` Randy Brukardt
2017-08-05  7:49       ` Dmitry A. Kazakov
2017-08-07 22:59         ` Randy Brukardt
2017-08-08  6:13           ` Dmitry A. Kazakov
2017-08-09  0:38             ` Randy Brukardt
2017-08-09  7:06               ` Dmitry A. Kazakov
2017-08-09 23:03                 ` Randy Brukardt
2017-08-10  7:13                   ` Dmitry A. Kazakov
2017-08-11  0:33                     ` Randy Brukardt
2017-08-11  6:55                       ` Dmitry A. Kazakov
2017-08-11 20:49                         ` Randy Brukardt [this message]
2017-08-03 17:27   ` Eryndlia Mavourneen
2017-08-05  0:09     ` Randy Brukardt
2017-08-05 19:02       ` Eryndlia Mavourneen
2017-08-07 22:49         ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox