[plt-scheme] GUI Development Approach

From: Hendrik Boom (hendrik at pooq.com)
Date: Tue Nov 22 20:15:21 EST 2005

On Tue, Nov 22, 2005 at 07:47:06PM +0000, Paulo Jorge Matos wrote:
> Hi all,
> 
> I'm not used to development of GUI applications but from what I've
> seen from GTK apps (generated usually by Glade) and MrEd apps, code
> gets a mess rapidly since all widgets get stuck into the same file
> when created due to the fact that they interact with one another. A
> button click updates a list box. The list box updates some fields. The
> menu bar... etc, etc, etc...
> 
> Is there a structured approach to writing a GUI without having to
> define all widgets in a module.
> I tried to define each GUI part as an object. Initially I had a
> dependency graph and I made sure all widgets which generated a
> dependency cycle (changed each other) were within the same module. And
> the initial implementation started ok. With the need to add features,
> I started to need to change this button and that label and that...
> that were in diferent models. Now I'm stuck in the middle of cyclic
> module dependencies... :-|
> 
> Any hints, tips, or reference papers would be _greatly_ appreciated.

I have no knowledge of how GUI toolkits are embedded in Scheme,
but I would imagine the following:  Each time the program has to
ask the user something, it builds a gadget of some sort and displays
stuff, and leaves continuations attached to the various response
actions that the user can make.  This way the recursion you're having
trouble with turns into the natural recursion/continuation structure
of Scheme.

-- hendrik


Posted on the users mailing list.