comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Thickening Ada GTK or Vala Binding ?
Date: Mon, 14 Jan 2013 18:34:02 -0600
Date: 2013-01-14T18:34:02-06:00	[thread overview]
Message-ID: <kd2863$lv$1@munin.nbi.dk> (raw)
In-Reply-To: ddd5b5f2-7bb3-4e34-a232-cfdebea07e41@googlegroups.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2522 bytes --]

<gautier_niouzes@hotmail.com> wrote in message 
news:ddd5b5f2-7bb3-4e34-a232-cfdebea07e41@googlegroups.com...
Le samedi 29 d�cembre 2012 00:51:24 UTC+1, Randy Brukardt a �crit :
>>
>> I reluctantly have to agree with Dmitry. We tried to hide all of the 
>> warts
>> of Win32 with Claw, but that mainly made a different set of warts. I 
>> rather
>> doubt it is possible to hide everything mainly because the event-driven
>> model of programming simply does not mesh that well with "classical"
>> sequential code (and the same is true for object-oriented code). And it's
>> pretty much impossible to completely eliminate the event-driven nature of 
>> a
>> GUI. (That's especially true for "modeless" windows/dialogs.)
>>
>> If someone knows how to pull it off, that's great. But I won't believe it
>> until I see it.
>
>AZip ( http://azip.sf.net ) and TeXCAD ( http://texcad.sf.net ) are 
>complete
>Windows applications, both even multi-document, and you won't find any 
>event
>message processing in their sources.
>Is it an evidence for you ?
>NB: the GUI framework is GWindows...

GWindows is essentially the same design as Claw, so of course it requires a 
lot of event processing. You're right that there probably isn't any raw 
event messaging processing (there isn't any need for most Claw programs 
either), but there are still lots of events (When_handlers in Claw 
terminology, these are overridden routines that handle events). I was 
talking about events in general, not "message" processing specifically. For 
instance, you have to have some sort of event handler in order to respond to 
the selection of a menu entry.

GWindows supports using access-to-subprogram routines for this, as well as 
the overridden routines of Claw. But clearly either of them is an event 
handler (not necessarily directly corresponding to a message, so they might 
not be "message handlers").

The only realistic exception to requiring event handlers is to use some sort 
of case structure. Besides being less safe (it's easy to forget to handle 
something required), it's also very limiting, because you can only handle 
specific kinds of event this way (and only ones the framework knows about). 
That is, you could handle menu events with a case structure (Claw provides 
something like this), but then you can't handle keyboard input or mouse 
actions or data validations or whatever. That makes it a very limiting 
solution, and it definitely can't be the only one.

                                       Randy.






  reply	other threads:[~2013-01-15  0:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27 17:45 Thickening Ada GTK or Vala Binding ? Patrick
2012-12-27 19:07 ` Dmitry A. Kazakov
2012-12-27 21:53   ` Patrick
2012-12-28  7:57     ` Dmitry A. Kazakov
2012-12-28 23:51       ` Randy Brukardt
2013-01-13  6:24         ` gautier_niouzes
2013-01-15  0:34           ` Randy Brukardt [this message]
2012-12-27 22:58 ` Brian Drummond
2012-12-27 23:06   ` Patrick
2012-12-28  9:53     ` Brian Drummond
2012-12-28  0:53 ` Robert Matthews
2012-12-28  1:41   ` Patrick
2012-12-28  2:03     ` Robert Matthews
2012-12-28  5:22 ` Vadim Godunko
2012-12-28  7:38   ` Vadim Godunko
2013-02-07  9:34   ` Gour
2013-02-08  6:49     ` Gour
2012-12-28 11:34 ` Justin Time
2012-12-28 23:56   ` Randy Brukardt
2013-01-11  1:40     ` Saulo
2013-01-11 12:02       ` Jacob Sparre Andersen
2013-01-11 20:14         ` Dmitry A. Kazakov
replies disabled

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