[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
slot-value-using-class (was MCL Support E-mail address?)
- To: email@example.com (Markus Stolze) (by way of firstname.lastname@example.org (Alex Repenning)), email@example.com
- Subject: slot-value-using-class (was MCL Support E-mail address?)
- From: firstname.lastname@example.org (Bill St. Clair)
- Date: Thu, 30 Dec 1993 14:25:38 -0600
- Cc: email@example.com
At 1:22 PM 12/11/93 -0700, Markus Stolze wrote:
>I was trying to get inbetween write-updates of *all* slots of a class.
>The strait forward way seemed to be specialize the
>(setf slot-value-using-class) method, but as it turnes out, this part of the
>MOP is not supported in MCL. (setf Slot-Value) accesses slots without
>calling (setf slot-value-using-class).
>The next way I thought of was to specialize the initialize-instance method
>of the meta-class Writer-Method and modify the method-code at definition
>time. But I had to find out that -while the meta-class Writer-Method
>exisits- method-definition in MCL bypasses this and instances of this class
>are never made.
>So, the question remains: Are there ways (one would be enough) in MCL to
>get inbetween write-updates of *all* slots of a class?
I wrote a quick and dirty slot-value-using-class for MCL. It's drawback
is that it makes all SLOT-VALUE calls, even the implicit ones in
DEFCLASS generated accessor methods, go through SLOT-VALUE-USING-CLASS
(a real implementation would mark the class wrapper somehow to let
SLOT-VALUE know when calling SLOT-VALUE-USING-CLASS is not necessary.
The patch is available for anonymous FTP from cambridge.apple.com in
the file "/pub/mcl2/contrib/slot-value-using-class.lisp"