From: Mike G.
Subject: GTK/Glade and CL (sbcl / Linux)
Date: 
Message-ID: <809d571b-b971-459d-a097-a5020d4936da@z6g2000pre.googlegroups.com>
Anyone else using this combination and have tools or tricks to share?
I'm thinking specifically about macros that generate GUIs. I'd love to
see some different approaches to that.

I've used this combination very effectively tonight. For my GUI needs
in Lisp (which hasn't been much) I had used Ltk in the past (which is
quite nice, and multi-platform!).

But I have a number of scripts written in bash using gtkdialog for the
GUI. I did all the GUI design in Glade, originally. I've been looking
at recoding these scripts in Lisp to gain some flexibility and speed,
but I really didn't want to remake the GUIs in Ltk - both because I'm
lazy, and I don't want to answer questions about why the interface has
changed subtly.

So I googled around quickly and I found clg-0.93 (which needs parse-
number and s-xml). The build process wasn't too terrible. glade-
xml.lisp needs a small tweak. (BUILD-INTERFACE) crashes because it
doesn't handle a NIL properly, but it isn't too hard to debug.

After that, and its smooth sailing - I've been able to use (load-
interface "foo.glade") on essentially unchanged .glade files. The only
changes I've had to make are where I used a gtkdialog-specific exit
mechanism. Other than that, I just define Lisp functions with the same
name as my bash functions. I think it took me about an hour to hunt
down the needed Lisp bits and get it built and working on Fedora 9,
and another two hours on top of that to relearn my code, write it in
Lisp, convert the data files to sexps, and so on.

I've been pleasantly surprised. I thought it would be much more of a
pain to get all the Lisp packages together.

-M