[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MACL view bug?
- To: email@example.com
- Subject: MACL view bug?
- From: firstname.lastname@example.org (Matthew Cornell)
- Date: Tue, 28 Aug 90 12:52:23 EDT
Here's the demo code from scrolling-windows.Lisp, modified to show how
add-self-to-dilog gets called a second time when the dialog is *closed*!
I think this is buggy behavior and I've had to patch my application's
code to check for my-dialog being nil, a symptom of the 2nd call.
<demo code follows>
(require :scrolling-windows "ccl;examples:scrolling-windows")
(setq foo (oneof *scrolling-window*
(defobfun (view-draw-contents (ask foo my-scroller)) ()
;; draw the snazzy background
(paint-oval 75 75 200 200)
(frame-rect 20 20 100 100)
(erase-oval 50 50 135 135)
;; let this view's dialog items draw too/mc
(ask foo (view-draw-contents)) ;since we just defined it! mc
;;; MACL Bug:
;;; If you use foo (commented out below), (add-self-to-dialog temp) is run once.
;;; If you use (ask foo my-scroller), as shown below, it's run *twice*. <- bug!
(ask (ask foo my-scroller) ;foo
(let ((temp (oneof *button-dialog-item*
:dialog-item-font '("Chicago" 12)
:dialog-item-position #@(120 20)
(defobfun (add-self-to-dialog temp) (view)
(print "-> AddingI")