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

Re: Auto-scrolling fred windows



>Every now and then (;-)!) I like to "sprinkle" various debugging statements
>throughout my code. Stuff like: (format t "foo called with arg1 = ~a~%" arg1).
>Thus, my listener tends to accumulate A LOT of output, and sometimes it is a
>pain because I would like to interactive type something into the listener
>while at the same time reviewing debug output that has since scrolled off
>the screen.
>
>The question: has anyone implemented a simple fred-window that exhibits
>the same functionality as the listener, namely, that output written to
>this window automatically scrolls so that the last line written into the
>window is always the last line displayed on the screen?

This should do close to what you want:

(defclass status-window (fred-window) ())

(defmethod stream-tyo ((w status-window) char)
  (call-next-method)
  (when (eql #\newline char)
    (window-show-cursor w)))