CLIM mail archive

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

adding functionality to list-pane




Eventually, I want to enhance the functionality of my list-pane gadgets
so that they are sensitive to other kinds of pointer events (currently
they change value only on left-clicks;  I will want them to give them
behaviors for other kinds of clicks).  I thought the obvious way to do
this would be to implement an :around method for the appropriate
HANDLE-EVENT method.  However, when I trace HANDLE-EVENT while running
the basic list-pane, it never gets invoked on pointer clicks.  I
implemented my :around method anyway, so that it is supposed to break on
any pointer click, but the method is never called.  What is wrong, and
how should I be approaching this?  I'm running Lucid Beta Clim 2.0.

Thanks,
Suzanne

(defvar *items* '(apples bananas cherries dates))

(defmethod clim:handle-event :around ((pane clim:list-pane)
				      (event clim:pointer-button-press-event))
  (break)
  (call-next-method))

(clim:define-application-frame list-pane-test ()
  ((selections :accessor list-pane-selections))
  (:pane
   (clim:with-application-frame (frame)
     (clim:vertically ()
       (setf (list-pane-selections frame) 
	     (clim:make-pane 'clim:list-pane 
			     :mode :some-of
			     :client frame
			     :items *items*
			     ))
       (clim:make-pane 'clim:push-button :label "Abort"
		       :client frame
		       :activate-callback
		       #'(lambda (gadget)
			   (clim:frame-exit (clim:gadget-client gadget))
			   ))
       ))))



(defun run-test ()
  (clim:run-frame-top-level
   (clim:make-application-frame 'list-pane-test)))

-------


Main Index | Thread Index