[Openmcl-devel] MOP initialize-instance question
rm at fabula.de
rm at fabula.de
Mon Sep 13 01:57:41 PDT 2004
On Mon, Sep 13, 2004 at 01:25:26AM -0700, Cyrus Harmon wrote:
> So I'm trying to make my own metaclasses and I have a class that has a
> mix of some "special" slots and some standard slots. I can get
> slot-value-using-class and setf s-v-u-c to work properly, but I can't
> figure out how to hijack the initargs stuff so the MOP code Does What I
> Mean. It would be nice if there were an initialize-slot that got called
> by initialize-instance (or %shared-initialize).
Initialize _what_ instance - that of your metaclass or that of classes
having your metaclass as the metaclass?
For the first there is compute-effective-slot-definition where you get
a chance to initialize your slots ....
> But there doesn't seem
> to be. Any suggestions for how I can get slot-specific (or even
> direct-slot-definition-specific) behavior so I can use the built-in
> stuff for "normal" slots and do my own work to figure out what the
> values (and where they should go are) for my non-normal slots?
Hmm, again, this depends on the above question, but can't you just
write a defmethod for 'initialize-instance :after' specialized on
your direct or effective slot?
>
> Is there a better way to skin this cat?
Oh, this cat seems to have many skins ;-)
HTH Ralf Mattes
> Thanks,
>
> Cyrus
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
More information about the Openmcl-devel
mailing list