Widget Commands

In Tcl/Tk, the interactive on-screen widgets are represented internally by appropriate commands which are adressed by strings, e. g. .text.

In Chicken/Tk, the widget commands are translated to Scheme procedures. Later on, the commands are invoked with symbols as sub-commands.

The procedure associated to the Tk root window is bound to the symbol tk.

For debugging purposes, there is a console which allows you to try the widget commands as easy as under the wish. Lower entry field is for input, upper text field is output. Try this:

(load "chickenTk.scm") ;; load the Tk extension
(start-tk)             ;; invoke Tk
(tk/console)           ;; your command window
(event-loop)           ;; interaction Scheme <-> Tk
(end-tk)               ;; kill Tk
(exit)                 ;; you're done.

© Author | Home | Sitemap