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

Re: MetaClass

  Date: Fri, 27 Jan 89 07:24:10 PST
  From: "@lll-winken.UUCP"@Xerox.COM, milich%whuts@att.ARPA
  Message-Id: <8901271524.AA17142@arisia.Xerox.COM>
  Received: by lll-winken.llnl.gov (smail2.5)
   	id AA13802; 27 Jan 89 06:52:02 PST (Fri)
  Received: by att.ATT.COM (smail2.6 - att-ih)
   	id AA00447; 27 Jan 89 08:45:56 CST (Fri)
  To: CommonLoops.PA@Xerox.COM
  Subject: MetaClass
  I am trying to define my own metaclass using the (:metaclass my-meta-class)
  option. I'm not having much success. Below is a simple example:
  (defclass my-meta-class (standard-class) (mc-a mc-b) )
  (defclass my-class () (a b) )
  (defclass my-class1 (my-class) (c d) (:metaclass my-meta-class))
  Why doesn't this work!! What am I doing wrong?
  I am using the latest version of pcl (12/7/88).
  Please Help.
       Thank you,
              greg milich   milich@whuts.att.com
Many people ask me this.  As it stands, your metaclass is
incompatiable with standard-class (the metaclass of my-class1).  Add
this mixin to metaclasses that can be mixed with standard-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))

By default metaclasses are not compatible unless you say they are.
This prevents oil from fixing with water.