CLIM mail archive

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

Incremental Redisplay question



Is this the right email address for posting to the CLIM news group?

If not, what is?

If so, here's my question.


In thinking about Robert Pfeiffer's redisplay problem, I tried the following 
example:

(defun test (stream)
  (let* ((i 0)
         (record (updating-output (stream)
                   (loop for j from 0 to 4
                         do
                     (updating-output (stream :unique-id j 
				       :cache-value (+ (* 5 i) j)
                                       :cache-test #'my-cache-test)
                       (format stream "Element ~d~%" 
			       (+ (* 5 i) j)))))))
    (force-output stream)
    (loop for k from 1 to 50 do
      (catch 'weird     
        (incf i)
        (redisplay record stream)))))

(defun my-cache-test (x y)
  (if (zerop (random 4))
      (throw 'weird nil)  ;;; skip the rest of the incremental redisplay
      (= x y)))

The idea is to see if I can easily respond to an asynchronous
event (simulated here by the call to random) by terminating the current
redisplay using catch & throw, dealing with the event, and then
trying the redisplay again.

When I try this on a MacIvory, with CLIM 2.0 Beta, I end up in the
debugger with a NIL output record problem.

What am I doing wrong?


Follow-Ups:

Main Index | Thread Index