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

Re: call-next-method in CLOS



Brian Dennis <xjam@ginkgo.CS.Berkeley.EDU> writes:

> While compiling clue/shells.lsp I ran across a call to call-next-method
> which actually passes arguments. The builtin CLOS of CLISP seems to
> disallow this but my CLTL2 copy says it's applicable.

The builtin CLOS of CLISP doesn't support CALL-NEXT-METHOD with arguments.

> Any quick fixes and/or clarifications?

Try this one:

*** clue/shells.lsp%    Fri Oct 29 19:33:11 1993
--- clue/shells.lsp     Fri Oct 29 19:33:11 1993
***************
*** 127,135 ****
  
  (defmethod (setf contact-state) :around (new-state (shell override-shell))
    ;; :iconic is equivalent to :withdrawn for override-shell
!   (call-next-method
!     (if (eq :iconic new-state) :withdrawn new-state)
!     shell))
  
  
  
--- 127,135 ----
  
  (defmethod (setf contact-state) :around (new-state (shell override-shell))
    ;; :iconic is equivalent to :withdrawn for override-shell
!   (if (eq :iconic new-state)
!     ((setf contact-state) :withdrawn shell)
!     (call-next-method)))
  
  
  

One such a usage of CALL-NEXT-METHOD also appeared in the Apply2C compiler,
and it could be patched away like this one. As long as no package
really needs CALL-NEXT-METHOD with arguments, I won't implement it.


                    Bruno Haible
                    haible@ma2s2.mathematik.uni-karlsruhe.de