Wow: thanks for the wonderfully rapid response. Yes, the latest ltk made the issue I was having obsolete, now that tile is merged! <br><br>The weekend came, so I had a small window of time to try and put all the pieces of this ltk stuff together and make a small window that did something. In this case the widget computes the area of a circle, when given the diameter--rather elementary, but a start. Everytime I had a question, I ended up finding answers in the archives of this mailing list! Since it was my first try at making a gui that did something other than say "hello," and since I am new to lisp and new to programming in general, I am pasting this trivial excercise in hopes that you (or any advanced ltk-user) could offer criticism as to best practices, etc:<br>
<br><div style="margin-left: 40px;"><i>;;;;; area.lisp endeavors to create a widget that calculates the area of a circle when given a diamter</i><br></div><br><div style="margin-left: 40px;"><i>;; load dependent systems<br>
(load "/usr/local/lisp/systems/ltk/ltk")<br>(in-package :ltk)<br><br>;; define function<br>(defun circularea ()<br> (with-ltk (:debug-tcl nil)<br> (wm-title *tk* "circularea")<br> (let* (<br> (label-d (make-instance 'label<br>
:text "A circle with a diameter of "))<br> (entry-d (make-instance 'entry<br> :text "0"))<br> (label-u (make-instance 'label<br> :text "units"))<br>
(label-a (make-instance 'label<br> :text "has an area of "))<br> (label-r (make-instance 'label<br> :text "0"))<br> (label-su (make-instance 'label<br>
:text "square units"))<br> (b (make-instance 'button<br> :text "calculate"<br> :command<br> (lambda ()<br> (progn<br>
(setf diameter (read-from-string (text entry-d)))<br> (setf radius (/ diameter 2))<br> (setf pi 3.145927)<br> (setf area (* pi (* radius radius)))<br> (setf (text label-r) area)<br>
))))<br> )<br> (pack label-d)<br> (pack entry-d)<br> (pack label-u)<br> (pack label-a)<br> (pack label-r)<br> (pack label-su)<br> (pack b)<br> )))<br><br>;; use function<br>
(circularea)<br></i></div><br>Thanks again for making gui programming possible for the rest of us.<br><br>--Everett<br><br><div class="gmail_quote">On Thu, Apr 8, 2010 at 2:31 PM, Peter Herth <span dir="ltr"><<a href="mailto:herth@peter-herth.de">herth@peter-herth.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Everett,<br>
<br>
as it is late over here, only a very brief answer: in the meantime,<br>
ltk-tile has been merged into<br>
the main ltk library, if you grab the latest ltk version from:<br>
<a href="http://ltk.rplay.net/svn/branches/ltk/repl/ltk.lisp" target="_blank">http://ltk.rplay.net/svn/branches/ltk/repl/ltk.lisp</a><br>
you get a ltk which uses the tile widget set by default (assuming you<br>
are running tcltk 8.5 or above).<br>
The ltktest program contained within ltk.lisp also contains some demo<br>
code to switch between<br>
the different tile styles on your system - just try running (ltk:ltktest).<br>
If you have any more questions, I will gladly answer them tomorrow :)<br>
<font color="#888888"><br>
Peter<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
ltk-user site list<br>
<a href="mailto:ltk-user@common-lisp.net">ltk-user@common-lisp.net</a><br>
<a href="http://common-lisp.net/mailman/listinfo/ltk-user" target="_blank">http://common-lisp.net/mailman/listinfo/ltk-user</a><br>
</div></div></blockquote></div><br>