[ltk-user] Increamentally build the GUI?

Josef Wolf jw at raven.inka.de
Mon Nov 19 17:10:40 UTC 2012


Hello everybody,

I am trying to build my tk GUI incrementally. The SERVE-EVENT parameter seems
to suggest that something like the following should be possible:

  (defvar *frame*)
  (defvar *label-widget*)
  
  (with-ltk (:serve-event t)
    (setf *frame* (make-instance 'frame))
    (pack *frame*))
  
  (with-ltk (:serve-event t)
    (setf *label-widget* (make-instance
                          'label
                          :master *frame*
                          :text "initial text"))
    (pack *label-widget* :side :left))
  
  (with-ltk ()
     ;; All initializations are already done, we just need to enter MAINLOOP
     )

But instead of a single toplevel containing both, the frame and the label, I
get two separate toplevels. And none of those toplevels seem to contain the
label widget. The output of the ps command shows, that two separate WISH
processes are started, which obviously is not going to work.

Does anybody have an example of how to properly use the SERVE-EVENT parameter?




More information about the ltk-user mailing list