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,37023471dc2e1934 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s71.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Custom model in gtkada? References: <3ndpd7br1nn9$.vkcrts8e898z.dlg@40tude.net> <20060614210028.GA18024@ws.max.zp.ua> <44917d39$0$4495$9b4e6d93@newsread2.arcor-online.net> <44941be9$0$11065$9b4e6d93@newsread4.arcor-online.net> <14e2r2ftir9ok.i8u1axnplx11.dlg@40tude.net> <449a432e$0$15869$bb6a4dc3@news.uunet.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <6bfpg.12754$FQ1.8736@attbi_s71> NNTP-Posting-Host: 12.201.97.176 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s71 1151696706 12.201.97.176 (Fri, 30 Jun 2006 19:45:06 GMT) NNTP-Posting-Date: Fri, 30 Jun 2006 19:45:06 GMT Date: Fri, 30 Jun 2006 19:45:06 GMT Xref: g2news2.google.com comp.lang.ada:5352 Date: 2006-06-30T19:45:06+00:00 List-Id: 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