Tomas Zellerin wrote:
>> just open "modules/gtk2/ui.glade" in glade and add callbacks.
>> gtk:gui will do all the necessary magic.
>I think I see. I just did not believe that simple writing lisp into
>callbacks could work.
You can deduce that the module or more specifically, the GTK interaction
API with Lisp is still experimental. IMHO, writing Lisp code into a
Glade XML file is not TRT.
I'd very much prefer something which preserves lexical scoping: this is
really valuable, since the callbacks for now don't provide local context
and integrates nicely into Lisp. The current way of possibly passing
args via the symbol gtk::args and READ-FROM-STRING is, well, not ideal.
Over ten years ago, I've advocated separating the GUI look from the
application, and haven't changed opinion since. Externally manipulable
representations of the layout are one path in that direction, and that's
why I like the separate UI description idea approach that Glade
implements, even though I can't comment on its details.
I think there's a need for a good mapping between the XML signal string
information and Lisp code. Maybe just a combination of resolver
function and alist?
(flet ((about #)
(wclose (widget) (gtk_destroy widget))
`(("open-about" . ,#'about)
("close-main" . ,#'wclose)))))
well, that's certainly not enough since one would like to access some
widgets via a local variable ...
BTW, there are several other GTK bindings out there. Maybe this one
should not be too different from the others -- should they (unlikely)
resemble each other.