CLIM mail archive

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

Accepting values problem.




Vitals: CLIM 1.1, LUCID 4.0, SUN IPC

ACCEPTING-VALUES doesn't seem to process gestures that are actions,
ie., if while filling in a value for an ACCEPT, and an action gesture
is performed, that action isn't executed.  This works fine if it is a
plain ACCEPT, but if the ACCEPT is inside the ACCEPTING-VALUES,
nothing happens.  It works for scrolling the pane which I presume is
implemented as an action too, right?

Here's a small example.  Also, the ACCEPT within the ACCEPTING-VALUES
barfs if one try to use the value in the above ACCEPT.


(in-package :user)

(clim:define-application-frame test ()
  ((+current-items+ :initform '(door1 door2 door3)))
   
  (:panes ((upper :application :scroll-bars nil)
	   (lower :interactor :scroll-bars :both)))
  (:command-table test-comtab)

  (:layout
   ((main 
     (:column 1 (upper .5) (lower .5))))))


(clim:define-presentation-action show-option
    (clim:blank-area nil test-comtab :gesture :describe)
  ()
  (loop for door in (slot-value clim:*application-frame* '+current-items+)
	with w = (clim:get-frame-pane clim:*application-frame* 'upper)
	initially (clim:window-clear w) do
	(terpri w)
	(clim:present door 'symbol :stream w)))


(define-test-command (com-exit :name t)
    ()
  (clim:frame-exit clim:*application-frame*))


(define-test-command (com-avs-fails-for-defaction :name t)
    ()
  (let ((lower (clim:get-frame-pane clim:*application-frame* 'lower))
	(upper (clim:get-frame-pane clim:*application-frame* 'upper)))
    (clim:window-clear upper)
    (clim:accept 'symbol :prompt "Click middle in upper to see choices")

    (clim:window-clear upper)
    (terpri lower)
    (clim:accepting-values (lower :resynchronize-every-pass t)
	(clim:accept 'symbol :prompt "Click here, then click middle in upper"
:stream lower))))

#|
(setq *frame* (clim:make-application-frame 'test :parent
		   (clim:open-root-window :clx :host "sunstruck")
						   :width 500 :height 300))
(clim:run-frame-top-level *frame*)
       
|#


0,,

Follow-Ups:

Main Index | Thread Index