[Haskell-cafe] Gtk2Hs and Glade Tutorial

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Fri Oct 13 18:22:44 EDT 2006

On Fri, 2006-10-13 at 15:18 +0200, Hans van Thiel wrote:
> Hello Duncan,
> Thanks for your reply, and here's the pdf.


> One of the things to be improved, which I note myself, is something on
> how to do it on the Windows platform.

It's much the same of course, but yes that would be nice.

>  (This is assuming there is a Glade for Windows.)

There is. It comes with the dev flavour of the Gtk+ installer.

> Another thing is the terminology, for example about handles, actions and
> functions. Glade uses 'signals' and 'callback functions' and you can
> specify them visually. I believe (I'll have to check this) you can look
> up the names in a file 'callbacks.c'. Of course you have to substitute
> those for the Gtk2Hs equivalents, but it might make it easier to find
> the appropriate ones in the Gtk2Hs API.

We do have slightly different terminology in a few places and usually
for good reason. For example the idea of a callback function makes a lot
of sense in C where you really do have to have a named function that
gets called in response to a signal. I Haskell we don't need a named
function of course we can just say:

onClicked button $ do

> I'll check out the link you provided in the next few days, and I'm
> looking forward to your comments. I'll also have to wait and see what
> Eddy Ahmed, the author of the Glade tutorial, thinks about this idea.
> It would be nice to reuse that, and to put the Haskell version on his
> more general web site as well. Why re-invent the wheel..

I'll send you some more comments when I've had a full read through.

Perhaps we should use the haskell.org wiki for this.


More information about the Haskell-Cafe mailing list