comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: Custom model in gtkada?
Date: Fri, 30 Jun 2006 19:45:06 GMT
Date: 2006-06-30T19:45:06+00:00	[thread overview]
Message-ID: <6bfpg.12754$FQ1.8736@attbi_s71> (raw)
In-Reply-To: <u8xnevd8j.fsf@nasa.gov>

Stephen Leake wrote:
> 
> Well, that's a poorly designed _system_. It has nothing to do with the
> GUI design.

That's the design of most windowing systems.

> How could it be otherwise, if a GUI is to provide a user-customizable
> framework?

The easiest way to answer this is to provide a complete example, which 
would be overkill here. JEWL comes with a number of examples; looking at 
a couple of those would do.

> Ok. In that case, the window object needs to contain pointers to the
> full state. Still no global variables.

I'd prefer to avoid this unnecessary use of pointers. Most windowing 
systems do not provide an easy way to associate data with a window, nor 
to access that data when responding to an event from a specific widget 
within the window.

> Ok, you are using a jargon definition of "intuitive". It still means
> "familiar"; ie, "something I learned before".
> 
> you mean "in computer programs they have used before". It is _not_ how
> things work in the real world; physics and engineering is a better
> model for that.

No, I mean the typical imperative program model, something like

do A
then do B

if some condition then
    do C
else
    do D

then do E

do F repeatedly until some other condition holds

corresponds to the way people with no programming experience describe 
how they do things. Maybe that's learned, but it's learned fairly early 
and seems pretty universal.

> Now I'm confused. "event queue" is orthogonal to "callback", as far as
> I can tell. The windowing systems I use have both event queues (to
> store and serialize the events) and callbacks (to handle the events).
> 
> I think you mean the event queue was more visible in JEWL. CLAW has an
> event queue (because MS Windows does), but it's not visible to the
> client packages.

I'm talking about the use of the system, not the details of how it's 
implemented. In the event-queue model, the client code obtains events 
from an event queue and responds to them; in the callback model the 
client associates events with subprograms it provides to the windowing 
system, yields control to the windowing system, and the windowing system 
calls the provided subprograms when it decides such calls are appropriate.

Say, even the description of the event-queue model is simpler than the 
description of the callback model.

-- 
Jeff Carter
"The time has come to act, and act fast. I'm leaving."
Blazing Saddles
36



  reply	other threads:[~2006-06-30 19:45 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 18:01 Custom model in gtkada? Dmitry A. Kazakov
2006-06-13 19:53 ` M E Leypold
2006-06-14  7:17   ` Dmitry A. Kazakov
2006-06-14 21:00 ` Maxim Reznik
2006-06-15  7:38   ` Dmitry A. Kazakov
2006-06-15 15:31     ` Georg Bauhaus
2006-06-15 16:24       ` Ed Falis
2006-06-15 18:44         ` M E Leypold
2006-06-15 16:25       ` Dmitry A. Kazakov
2006-06-17 15:13         ` Georg Bauhaus
2006-06-17 16:44           ` Dmitry A. Kazakov
2006-06-22  7:16             ` Emmanuel Briot
2006-06-22  8:31               ` Dmitry A. Kazakov
2006-06-22 12:08                 ` Emmanuel Briot
2006-06-23 12:32                 ` Stephen Leake
2006-06-23 13:58                   ` Dmitry A. Kazakov
2006-06-29 17:11                     ` Stephen Leake
2006-06-30 12:29                       ` Dmitry A. Kazakov
2006-07-02 15:17                         ` Stephen Leake
2006-07-03 18:23                           ` Dmitry A. Kazakov
2006-07-04 13:51                             ` Stephen Leake
2006-07-05 13:06                               ` Dmitry A. Kazakov
2006-07-06  7:10                                 ` Stephen Leake
2006-06-23 16:59                   ` Jeffrey R. Carter
2006-06-23 17:37                     ` Ed Falis
2006-06-23 18:11                     ` Dmitry A. Kazakov
2006-06-29 17:20                     ` Stephen Leake
2006-06-29 20:08                       ` Jeffrey R. Carter
2006-06-30 10:28                         ` Alex R. Mosteo
2006-06-30 16:07                         ` Stephen Leake
2006-06-30 19:45                           ` Jeffrey R. Carter [this message]
2006-06-30 22:41                             ` Randy Brukardt
2006-07-01  5:11                               ` Jeffrey R. Carter
replies disabled

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