CLIM mail archive

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

update on Lucid 4.1 + CLIM 1.0 bug



Yesterday I sent a bug report re: menus in Lucid 4.1 running CLIM
1.0. Here's an update, which indicates that there may be a CLOS
compatibility problem between Lucid 4.0 methods and 4.1 methods.

As a simple test of the menu problem, I wrote the following very
simple test:

(in-package :pop :use '(clim clim-lisp))

(defvar *clim-root*
   (clim::open-root-window :clx :host "bitter:0.0"))

(define-application-frame popup-test ()
  ()
  (:panes
   ((title          :title)
    (interactor     :interactor)
    (mouseline      :pointer-documentation)))
  (:layout
   ((layout1
     (:column 1
	      (title :compute)
	      (interactor :rest)
	      (mouseline :compute)
	      ))
   )))

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

(define-popup-test-command (com-choose-me :name t) ()
  (clim:menu-choose '("Foo" "Bar"")))

(defun start-me ()
  (let ((frame (clim:make-application-frame
		'popup-test
		:parent *clim-root*
		:width 400 :height 200)))
    (lcl:make-process :function 'run-frame-top-level
		      :args (list frame))
    frame))



The command com-choose-me runs fine in this example (somewhat to my
surprise). However, if I then add a dummy method on the generic
function clim:window-visibility, as follows:

(defmethod clim::window-visibility ((ignore integer))
  nil)

the menu disappearance problem shows up (integer is a random choice; T
has exactly the same effect).  BUT, if I then add another dummy
method, as follows:


(defmethod clim::window-visibility :after ((ignore T))
  nil)

the menu works ok again!



Here's a trace of window-visibility for these various conditions, as a
I popup the menu and move the mouse around:


> ;;; Lucid Common Lisp/SPARC
;;; Development Environment Version 4.1, 12 October 1992
;;; Copyright (C) 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992 by Lucid, Inc.
;;; All Rights Reserved
;;;
;;; This software product contains confidential and trade secret information
;;; belonging to Lucid, Inc.  It may not be copied for any reason other than
;;; for archival and backup purposes.
;;;
;;; Lucid and Lucid Common Lisp are trademarks of Lucid, Inc.  Other brand
;;; or product names are trademarks or registered trademarks of their
;;; respective holders.

> (load "~/clim-test")   ;; the example, included above
;;; Loading binary file "/usr/rshapiro/clim-test.sbin"
#P"/nfs/kariba/u2/rshapiro/clim-test.sbin"
> (pop::start-me)
#<Popup-Test #X13DF84E>
> (trace clim::window-visibility)
(CLIM:WINDOW-VISIBILITY)

;;; At this point, I run the Choose Me command, the menu pops up, I
;;; move the mouse around and finally select something from the menu.

> 1 Enter CLIM:WINDOW-VISIBILITY #<CLIM::CLX-MENU-WINDOW /x 173:260 y 122:194/ 12156BE>
1 Exit CLIM:WINDOW-VISIBILITY T
1 Enter CLIM:WINDOW-VISIBILITY #<CLIM::CLX-MENU-WINDOW /x 173:260 y 122:194/ 12156BE>
1 Exit CLIM:WINDOW-VISIBILITY T
1 Enter CLIM:WINDOW-VISIBILITY #<CLIM::CLX-MENU-WINDOW /x 98:189 y 98:174/ 12156BE>
1 Exit CLIM:WINDOW-VISIBILITY T
;;; etc

;;; Everything works fine. Now I define the dummy method:

(defmethod clim::window-visibility ((foo integer))
  nil)
#<Standard-Method WINDOW-VISIBILITY (INTEGER)>
> 

;;; and run Choose Me again. The menu disappears as soon as I move the mouse.

1 Enter CLIM:WINDOW-VISIBILITY #<CLIM::CLX-MENU-WINDOW /x 168:255 y 33:105/ 12156BE>
1 Exit CLIM:WINDOW-VISIBILITY NIL
1 Enter CLIM:WINDOW-VISIBILITY #<CLIM::CLX-MENU-WINDOW /x 168:255 y 33:105/ 12156BE>
1 Exit CLIM:WINDOW-VISIBILITY NIL
1 Enter CLIM:WINDOW-VISIBILITY #<CLIM::CLX-MENU-WINDOW /x 166:257 y 31:107/ 12156BE>
1 Exit CLIM:WINDOW-VISIBILITY NIL
;;; etc


;;; Now I add the dummy :after method

(defmethod clim::window-visibility :after ((default t))
   nil)

#<Standard-Method WINDOW-VISIBILITY :AFTER (T)>
>

;;; and run Choose Me yet again. Menu is now fine.

 1 Enter CLIM:WINDOW-VISIBILITY #<CLIM::CLX-MENU-WINDOW /x 131:218 y 44:116/ 12156BE>
1 Exit CLIM:WINDOW-VISIBILITY T
1 Enter CLIM:WINDOW-VISIBILITY #<CLIM::CLX-MENU-WINDOW /x 131:218 y 44:116/ 12156BE>
1 Exit CLIM:WINDOW-VISIBILITY T
1 Enter CLIM:WINDOW-VISIBILITY #<CLIM::CLX-MENU-WINDOW /x 131:218 y 44:116/ 12156BE>
1 Exit CLIM:WINDOW-VISIBILITY T
;;; etc


All of which suggest to me that something is going wrong in the CLOS
code which computes the effective method for clim:window-visibility.


0,,


Main Index | Thread Index