[mcclim-devel] No scrolling in interactor pane
I've been playing around a bit over the last few days and have kind of hooked up maxima with mcclim, basically cargo-culting the listener app. The basic interaction works, and the computed expressions are displayed correctly. (Some random screenshots can be found at http://common-lisp.net/~rtoy. In particular, maxima-repl-boxed.png shows what the subexpressions should be.) In this case, the output is computed as a string by maxima, and that is printed to the mcclim's *standard-output*. However, to be able to present subexpressions (eventually), I changed the way output is done. I use maxima's capabilities of drawing to a terminal with cursor positioning and thus set the stream-cursor-position as needed. This also works. Until I reach the bottom of the interactor pane. The pane never scrolls down and the prompt keeps getting overwritten. I'm obviously missing something, but I don't know what. Anyone have some hints for this clim newbie? Ray P.S. A current very hackish version of the code is available at common-lisp.net/~rtoy/maxima-repl-2005-07-02.lisp.
On Jul 2, 2005, at 10:46 PM, Raymond Toy wrote:
I've been playing around a bit over the last few days and have kind of hooked up maxima with mcclim, basically cargo-culting the listener app. The basic interaction works, and the computed expressions are displayed correctly. (Some random screenshots can be found at http://common-lisp.net/~rtoy. In particular, maxima-repl-boxed.png shows what the subexpressions should be.)
In this case, the output is computed as a string by maxima, and that is printed to the mcclim's *standard-output*.
However, to be able to present subexpressions (eventually), I changed the way output is done. I use maxima's capabilities of drawing to a terminal with cursor positioning and thus set the stream-cursor-position as needed.
This also works. Until I reach the bottom of the interactor pane. The pane never scrolls down and the prompt keeps getting overwritten.
I'm obviously missing something, but I don't know what. Anyone have some hints for this clim newbie?
This is annoying. If you're outputing a stream of expressions, like in a listener, you could try a call to fresh-line after each one. Otherwise You can try code like: (defclass redisplay-frame-mixin () ()) (defmethod redisplay-frame-pane :after ((frame redisplay-frame-mixin) (pane application-pane) &key force-p) (declare (ignore force-p)) (change-space-requirements pane :height (bounding-rectangle-height (stream-output-history pane)))) Tim
Timothy Moore wrote:
On Jul 2, 2005, at 10:46 PM, Raymond Toy wrote:
[snip]
This is annoying. If you're outputing a stream of expressions, like in a listener, you could try a call to fresh-line after each one. Otherwise
What I do is move the stream cursor somewhere, then write-char one or more characters, then move the cursor somewhere else and write-char some more. I don't really know where to put a fresh-line.
You can try code like:
(defclass redisplay-frame-mixin () ())
(defmethod redisplay-frame-pane :after ((frame redisplay-frame-mixin) (pane application-pane) &key force-p) (declare (ignore force-p)) (change-space-requirements pane :height (bounding-rectangle-height (stream-output-history pane))))
Thanks, this helps a lot! The output now causes the window to scroll. That's good. But the prompt refuses to go past the (original) bottom of the window, so all prompts are eventually on top of each other, as well as the input. The prompt is just princ some string to *standard-output*. Thanks for your help! Ray
participants (2)
-
Raymond Toy
-
Timothy Moore