My environment: Windows Vista, Tcl/Tk 8.5.7.0 and Clozure Common Lisp Version 1.3-r11936 (WindowsX8632).<br><br>I took a look at the forthcoming version of LTK at the address above. I understand that this is work-in-progress<br>
and that some of my observations may be the result of how Windows or Tk behaves so that nothing can be done.<br>I also know almost nothing of Tk, very little of LTK and Lisp are a bit rusty, so bear with me...<br><br><br>
1. tktable.lisp<br><br>When I did (compile-file "tktable") I got the following warning:<br> ; In an anonymous lambda form at position 2382: Initarg :ROWS occurs in both ROWS and COLS slots<br>
I guess this is a valid error message and the code should be corrected like this (the original row is commented out):<br>(defclass scrolled-table (frame)<br> ((table :accessor table)<br> (hscroll :accessor hscroll)<br>
(vscroll :accessor vscroll)<br> (rows :accessor rows :initarg :rows :initform nil)<br> ;(cols :accessor cols :initarg :rows :initform nil)<br> (cols :accessor cols :initarg :cols :initform nil)<br> (titlerows :accessor titlerows :initarg :titlerows :initform nil)<br>
(titlecols :accessor titlecols :initarg :titlecols :initform nil)<br> (data :accessor data :initarg :data :initform nil)<br> ))<br><br>When I run (tabletest) I get a neat-looking table with 200 rows and 40 columns. The cells have light-gray (?) background<br>
and the foreground color is black (?). Very clear, no strain to the eye.<br><br>But when I click a cell with the mouse, the background first changes to blue(?) then changes back to <br>the original light-gray (?) and the foreground color changes to white (?). This combination<br>
of colors makes it very hard to see what the cell contents are.<br><br>Scrolling by dragging the thumbs OK. Vertical scroll with either PgDn-key or by clicking the vertical scroll area below <br>the thumb brings new rows into view but leaves one row out. The reason (as an example) is this: when the table is<br>
at first displayed it shows the first 34 rows in whole and a tiny slice of the 35th row also. The system "thinks" that<br>the row 35 was shown although it was not wholly visible and starts showing the next rows from the 36th row onward.<br>
<br>If I squeeze the tiny slice out by diminishing the window height a
little the vertical scroll starts to function correctly. It would<br>be nice if Ltk or Tk could squeeze the slice out instead.<br><br>Still
on the vertical scroll: If in the starting view (i.e. the rows 1-34
showing) I click the cell of (row 9, col 5), for instance,<br>
to get it focused and then do a vertical scroll of one pagefull and scroll back (PgDn and PgUp, for instance), the focus<br>(i.e. the text caret) is in the cell (row 1, col 1) and the cell (row 9, col 5) is displayed with a blue background.<br>
<br><br>2. ltk.lisp<br><br>THE TEST i.e. (ltktest) OK as far as I understand. The Tk styles for Windows (winnative, xpnative) work beautifully.<br>As the program starts the default selection of the radio button is on and the theme is xpnative as it should be on Vista.<br>
If, however, I choose another theme and then select the default again, the theme is not xpnative but Motif I think.<br><br>EDIT: It later occurred to me that maybe "default" here means "Tk default" and not "Windows XP/Vista default" but still<br>
the behavior is not consistent.<br><br>(ltkeyes) OK. All other tests except defwidget-test work. Running (defwidget-test) gives the error msg<br>
"Class named TW not found.".<br><br><br>3. ltk-tile.lisp<br><br>Running (tile-test) gives several times the error 'Tcl/Tk error: invalid command name "style" '. After adding<br>"ttk::" to the beginning of "style" like this:<br>
<br>(defun theme-names ()<br> (send-wish "senddatastrings [ttk::style theme names]")<br> (ltk::read-data))<br><br>(defun use-theme(name)<br> (format-wish "ttk::style theme use ~a" name))<br><br>the program runs OK except that it has the same problem with the default theme as ltktest above.<br>
<br><br>4. ltk-mw.lisp<br><br>Compiling gives:<br> ((SETF DATA) :AFTER (T LIST-SELECT)): Unused lexical variable VAL<br><br>Apparently it concerns the last method in the list-select box widget:<br><br>(defmethod (setf data) :after (val (select list-select))<br>
(listbox-clear select)<br> (listbox-append select (mapcar (lambda (item)<br> <div> (list-select-display select item))<br> (data select))))<br>
<br>The test (tooltip-test) functions, sort-of. The tooltip is shown but at the screen position (0,0)! <br>
While debugging by spreading prints around I by accident discovered a silly way of correcting <br>the behavior. This is how the last lines of the tooltip method show look like now when it<br>is operating correctly:<br> (when (and txt (> (length txt) 0))<br>
(setf (text (tooltip-label tooltip)) txt)<br> ;(print (geometry tooltip ))<br> (set-geometry-xy tooltip (truncate x) (truncate y))<br> ;(print (geometry tooltip ))<br> (geometry tooltip )<br> (normalize tooltip)<br>
;(print (geometry tooltip ))<br> (raise tooltip))))<br><br>So the extra call to geometry does the trick and naturally I have no idea what is going on here.<br><br>Running (gtree-demo) produces errors about :borderwidth and height in:<br>
(defmethod gtree-render-node ((d gtree-demo) node )<br> (make-instance 'label :master d :text node :borderwidth 3 :relief :raised :background :grey :height 1 :width 10))<br>After the removal of these the run succeeds.<br>
<br>Rest of the demos OK.<br><font color="#888888"><br><br>Jussi Salmela<br></font></div>