CLIM mail archive

[Prev][Next][Index][Thread]

incremental redisplay documentation example bug



    Date: Tue, 28 Apr 1992 11:28 EDT
    From: Meir Laker <meir@watson.ibm.com>

    Although the example given in the CLIM documentation (section 22.6 of
    the Symbolics CLIM documentation, p. 254) works as documented on my
    Symbolics (in both its original form and the suggested modification
    with a sort on p. 255), the following slightly modified version of the
    code (interchanging the first and fifth element values) does not.
    Why not?

    (defun test (&optional (stream *standard-output*))
      (let* ((list (list 1 2 3 4 5))
	     (record
	       (clim:updating-output (stream)
		 (do* ((elements list (cdr elements))
		       (count 0 (1+ count))
		       (element (first elements) (first elements)))
		      ((null elements))
		   (clim:updating-output (stream :unique-id count
						 :cache-value element)
		     (format stream "Element ~D" element)
		     (terpri stream))))))
	(sleep 2)
    ;    (setf (nth 2 list) 17)
    ;    (setf list (sort list #'(lambda (&rest args)
    ;			      (zerop (random 2)))))
	(setf (nth 4 list) 1)
	(setf (nth 0 list) 5)
	(clim:redisplay record stream)))

    After the sleep, the final output is:

	    5
    Element 2
    Element 3
    Element 4
	    1

    The "Element" is missing from the first and last lines and the 1 is
    shifted somewhat to the left of being aligned in the column of
    numbers.  What went wrong?

This works in CLIM 1.1, which you should be receiving soon.


References:

Main Index | Thread Index