CLIM mail archive


Problem using Handle-event

CLIM 2.0

We are trying to capture the keyboard input so we can build a string
while CLIM is displaying information it reads from the stream.  From
reading the manual it looks like we want to specialize handle-event so
that it builds the string in addition to whatever else it is doing.
The problem is that handle-event does not sem to process anything
except pointer-exit and pointer-enter events.  We built a small test
application which specialized handle-event to print the type of the
event on the window.  The code follows.

Does anyone have any suggestions about how to gather up the keyboard
input while processing clim commands from another source?  Also, does
anyone know what handle-event is supposed to do?

Nathaniel G. Martin           Department of Computer Science       University of Rochester
(716) 275-4198                Rochester, NY  14627-0226
;;; -*- Package: user; Base: 10; Mode: LISP; Syntax: Ansi-common-lisp -*-

(CLIM:define-application-frame TEST ()
   (display :application))
   (default display)))

(defun TEST ()
  (setq *test-frame*
    (CLIM:make-application-frame 'test
				 :width 1100
				 :height 800))
  (CLIM:run-frame-top-level *test-frame*))

(defmethod CLIM:handle-event :after ((stream t) (event T))
  (declare (ignore stream))
  (format (CLIM:get-frame-pane CLIM:*application-frame* 'display)
	  "<Event ~S>~%" (CLIM:event-type event)))

Main Index | Thread Index