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

Re: meta-object protocol

  Date: Mon, 16 Jan 89 20:29:06 CST
  From: Jacky Combs <combs@STC.LOCKHEED.COM>
  Message-Id: <8901170229.AA04700@topaz.STC.LOCKHEED.COM>
  To: commonloops.pa@Xerox.COM
  Subject: meta-object protocol
  I would like to know where can I get a copy of the current draft of chapter 3
  of the CLOS spec (the one on the meta-object protocol).  I am really having
  problems trying to setup metalevel object base.
  For example, I have defined "my-meta-class" as a subclass of "standard-class"
  so that I can define additional slots and methods for "my-meta-class".  This
  definition works fine, but when I try to define a class as an instance of
  "my-meta-class" I get an error message from the method
  "check-super-metaclass-compatibility" telling me that a class and it's super
  have to be instances of the same class.  Does this mean that PCL only supports
  a single metaclass and that ALL classes (including system classes have to be
  instances of the same class)?
  Thanks -- Jacky
Add the following mixin to your meta class:

(defclass compatible-class-mixin
   "A metaclass mixin that provides compatibility with standard-class."))

(defmethod check-super-metaclass-compatibility
	   ((class compatibile-class-mixin) (super standard-class))

An unstated part of the PCL metaclass protocal is that you must
respond positively to this message if you can be used with
standard-class.  This is to prevent you from mixing water and oil.
The problem is that the default compatibility is NIL and most people
expect it to be T, perhaps it should be T.