[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help...I've got window confusion...
- To: firstname.lastname@example.org
- Subject: Help...I've got window confusion...
- From: email@example.com (Steve Chanin)
- Date: Fri, 17 Aug 90 18:47:03 EDT
- Reply-to: firstname.lastname@example.org
Below I've included part of a procedure from some code that's got me
baffled. Bascially, the procedure create and initializes "handey-windows"
a structure which contains a mac window. The problem I'm having occurs in
the window-close objfun. Because handey windows have data associated with
them, the usual window close function which just kills the mac window isn't
sufficient. Consequently, this window-close function (i.e. the one defined
below) tries to figure out which of the four display windows has had its
close box clicked then clears the contents of the handey-window structure
and resets the variable. Finally, usual-window-close is called. Using
(ed-beep), I've convinced myself that the conditional checking is going
down the correct path, but the call to usual-window-close doesn't do
anything unless the window clicked is the one pointed to by
*other-graphics-window* - in which case everything seems to work fine.
I've tried putting the call to usual... inside each arm of the cond, but
that doesn't help. Also, hlisp:clear-window just resets some handey-window
fields and erase rects the window, so I don't think it is the problem. I'm
really baffled because the close works fine for *other-graphics-window* but
not for any of the others. I'd appreciate any ideas.
(defun CREATE-HANDEY-WINDOW (&key
(title "Handey Window")
(size (list hu::*default-actual-window-width*
(position '(6 44)))
(let* ((mac-window (ccl:oneof (if hu::*color-handey*
:window-size (ccl:make-point (first size)
(ccl:defobfun (ccl::window-close mac-window) ()
(cond ((and *other-graphics-window*
(eq (handey-window-mac-window *OTHER-GRAPHICS-WINDOW*)
(setq *other-graphics-window* nil))
(eq (handey-window-mac-window *RECOGNITION-GRAPHICS-WINDOW*)
(setq *recognition-graphics-window* nil))
(setq *path-planning-graphics-window* nil))
(setq *grasp-planning-graphics-window* nil)))
... [extraneous code omitted] ...