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

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?

Another way of thinking about the desired effect is to say:

(setf foo-win (make-instance 'fred-window))

(dotimes (i 40)
  (format foo-win "i = ~a~%" i))

(fred-update foo-win)

--> At this point only the first 10 or so lines of the output are displayed.
I would like the LAST 10 or so lines displayed.

I am committed to building a window with this functionality, so if you
already have built such a beast, have a heart! Send me a copy!

  -- Luke

PS. Can I get this behavior through some funky subclassing of the 
    <listener> class? I was kinda concerned about mucking in that class...