[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with SLOT-VALUE-USING-CLASS and CLOS
The problem description given yesterday was a bit to simplified.
The code example leaves out a neccessary part which leads to the
specified error.
Corrected version of code example:
(defclass my-metaclass (standard-class)
((class-slot :accessor metaclass-class-slot))
)
(defclass my-class-mixin ()
((slot1 :accessor slot1)))
(defclass my-class1 (my-class-mixin)
((slot2 :accessor slot2))
(:metaclass my-metaclass))
(make-instance 'my-class1) ==> #<MY-METACLASS ...>
(defmethod slot-value-using-class :around
((class my-metaclass) object slot)
(let ((result nil))
(setf result (call-next-method))
result))
(defclass my-class2 (my-class-mixin)
((slot2 :accessor slot2))
(:metaclass my-metaclass))
(make-instance 'my-class2) ==> NIL
The automatic generated constructor method for MY-CLASS2 has a body
which only contains NIL instead of allocating a structure for this instance etc.
Can anybody help me?
Ekkehard Arleth
email: arleth@fzi.de