2
;;# showVars w var var var '...
4
;; Create a top-level window that displays a bunch of global variable values
5
;; and keeps the display up-to-date even when the variables change value
8
;; w - Name to use for new top-level window.
9
;; var - Name of variable to monitor.
11
(defun showVars (w args)
12
(if (winfo :exists w :return 'boolean) (destroy w))
14
(wm :title w "Variable values")
15
(label (conc w '.title) :text "Variable values:" :width 20 :anchor "center"
16
:font :Adobe-helvetica-medium-r-normal--*-180*)
17
(pack (conc w '.title) :side "top" :fill "x")
19
(frame (conc w '|.| i))
20
(label (conc w '|.| i '.name) :text (tk-conc i ": "))
21
(label (conc w '|.| i '.value) :textvariable
22
(list (or (get i 'text-variable-type) t) i))
23
(pack (conc w '|.| i '.name) (conc w '|.| i '.value) :side "left")
24
(pack (conc w '|.| i) :side "top" :anchor "w")
26
(button (conc w '.ok) :text "OK" :command (tk-conc "destroy " w))
27
(pack (conc w '.ok) :side "bottom" :pady 2)