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

Scoping of init-plist in initialize



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