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

Help...I've got window confusion...



   From: sbchanin@ai.mit.edu (Steve Chanin)

   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 obfun.

   (defun CREATE-HANDEY-WINDOW (&key 
				(title "Handey Window")
				(size (list hu::*default-actual-window-width*
					    hu::*default-actual-window-height*))
				(position '(6 44)))
     (let* ((mac-window (ccl:oneof *window*)))
       (ccl:defobfun (ccl::window-close mac-window) ()
   ... [some extraneous code omitted] ...
	 (ccl::usual-window-close))
   ... [more extraneous code omitted] ...

Unfortunately, DEFOBFUN can be used to create multiple closures.  I'm
not sure of the exact mechanics of this, but if you use the same
closure-defobfun to define a function for more than one object, they
end up sharing too much structure, and things don't work.

You can probably get around this by creating the function directly
with NFUNCTION, and adding it to the object with FHAVE.

   -andrew