[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Auto-scrolling fred windows
- To: hohmann@zug.csmil.umich.edu
- Subject: Re: Auto-scrolling fred windows
- From: bill@cambridge.apple.com (Bill St. Clair)
- Date: Tue, 30 Jun 1992 18:40:04 -0500
- Cc: info-mcl
>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)))