Buy GNU books!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
Once GCL has been properly installed you should be able to do the following simple example:
(in-package "TK") (tkconnect) (button '.hello :text "Hello World" :command '(print "hi")) ==>.HELLO (pack '.hello)
buttoncreates a new function called
.hellowhich is a widget function. It is then made visible in the window by using the
You may now click on the little window, and you should see the command executed in your lisp. Thus "hi" should be printed in the lisp window. This will happen whether or not you have a job running in the lisp, that is lisp will be interrupted and your command will run, and then return the control to your program.
button is called a widget constructor, and the
.hello is called a widget. If you have managed to
accomplish the above, then GCL is probably installed correctly, and you
can graduate to the next section! If you dont like reading but prefer
to look at demos and code, then you should look in the demos directory,
where you will find a number of examples. A monitor for the garbage
collector (mkgcmonitor), a demonstration of canvas widgets (mkitems),
a sample listbox with scrolling (mklistbox).
|webmaster||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|