On 10/28/06, thenriksen thenriksen@common-lisp.net wrote:
;; XXX: We cannot use `scroll-extent', because McCLIM ignores it
;; unless the scrollee happens to be drawing. Very weird, should
;; be fixed.
I think I finally deciphered the purpose of the method in recording.lisp which defines this odd behavior: to supress scrolling of the stream when recording output to an offscreen record (such as using with-output-to-output-record). This is a legitimate concern, and simply removing the method would be wrong. This suggests that output to an offscreen output record should also not cause the stream-pane to be resized. McCLIM does not guard against this case. The following program demonstrates the problem:
(in-package :clim-user)
(define-application-frame oops-1 () () (:pane (scrolling (:width 300 :height 300) (make-pane :application-pane :end-of-line-action :allow :end-of-page-action :allow :display-function (lambda (frame stream) (with-output-to-output-record (stream) (dotimes (i 200) (format stream "~&You never see this.~%"))) (format stream "All those scrollbars for this little line of text?~%"))))))
The correct solution might involve checking that the open output record is connected to the stream output history, and supressing resizing and scrolling only if it is not (indicating offscreen drawing). Hmm.