[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a pesky bug
- To: email@example.com
- Subject: a pesky bug
- From: firstname.lastname@example.org (Blake Meike)
- Date: Thu, 14 Nov 91 12:43:02 -0500
Laura Bagnall, here at TERC, has tracked down
another annoying bug down in the innards of
MCL 2.0(p3). Any of you that have been using
windoids may want to take a look at this
There is a bug with windoids in which *windoid-count*
isn't properly maintained. Specifically, if you create
a windoid in which there are no other windoids, hide it,
then show it again, then *windoid-count* is 2 instead
of 1 (see transcript below). This is a problem because
(window-show <window>) seems to do a (set-window-layer
*windoid-count*) which will then put the window in the
wrong layer. I defined an :after method for window-show
which works around the problem and seems to make everything
behave correctly (again see transcript), but I'm sure that
there'd be a better fix if one had the source.
? *windoid-count* ; no windoids around
? (setf test (make-instance 'windoid))
#<WINDOID "Untitled" #x6698D9>
? *windoid-count* ; we've just created and shown one windoid.
? (window-hide test)
? *windoid-count* ; no windoids visible.
? (window-show test)
? *windoid-count* ;Whoops! Only one visible windoid, but count is 2!
? (window-hide test)
? *windoid-count* ;no visible windoids, but count is 1.
? (windows :class 'windoid) ;just to confirm that there
;are no visible windoids.
? (setf *windoid-count* 0) ;set *windoid-count* to be the correct value again.
? (defmethod window-show :after ((w windoid)) ;define patch to work
;around the bug.
(setf *windoid-count* (length (windows :class 'windoid))))
#<STANDARD-METHOD WINDOW-SHOW :AFTER (WINDOID)>
? (setf test2 (make-instance 'windoid)) ;make another windoid
#<WINDOID "Untitled" #x681A31>
? *windoid-count* ;one windoid is visible.
? (window-hide test2) ;no windoids are visible.
? (window-show test2) ;one windoid is visible.
? *windoid-count* ;and *windoid-count* now reflects this.
2067 Mass. Ave.
Cambridge, MA 02140