[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Scoping of init-plist in initialize
- To: Rob Pettengill <rcp%sw.MCC.COM@MCC.COM>
- Subject: Scoping of init-plist in initialize
- From: Gregor.pa@Xerox.COM
- Date: Wed, 3 Feb 88 10:53 PST
- Cc: CommonLoops.pa@Xerox.COM
- Fcc: BD:>Gregor>mail>outgoing-mail-1.text
- In-reply-to: <8802030328.AA27247@perseus>
- Line-fold: no
Date: Tue, 2 Feb 88 21:28:26 CST
From: Rob Pettengill <rcp%sw.MCC.COM@MCC.COM>
In the new scheme my augmented init-plist isn't seen by any of the
call-next-method calls at all. Is there any way to hack around this until
initialize gets fixed up?
The reason is that the arguments call-next-method passes are the
original arguments received by the method. Setting them or defaulting
them doesn't affect the arguments passed by call-next-method. This is
as specified in the CLOS spec. But, you can pass arguments to
call-next-method explicitly to get around this. Note that the new
arguments are not allowed to change the method that would be called by
call-next-method.
So, in your case you could do:
(defmethod INITIALIZE ((self NX-WS-CONNECTION) init-plist)
(declare (special *window-server-connections*))
(setf (getf init-plist :ws-connection) self)
(setf (getf init-plist :root-canvas) self)
(call-next-method self init-plist)
...
)
Note that for the time being, call-next-method is a macro, not a
function so you can't apply it, you can just use it as the car of a
form.
-------