[Openmcl-devel] Is this a bug?

Shannon Spires svs at bearlanding.com
Wed Feb 8 09:21:15 PST 2017


Ron Garret <ron at flownet.com> wrote:

> Ah.
> 
> Is there a standard method that unconditionally calls all of the initform methods on an instance?  Or that simply restores the instance to its newly created state?  I tried INITIALIZE-INSTANCE and REINITIALIZE-INSTANCE and neither one of those seemed to work.

This is unorthodox and very MOP-py, but it seems to solve your problem (i.e. after defining this method, shared-initialize resets the instance to its initforms).

(defmethod slot-boundp-using-class ((class (eql (find-class 'foo)))
				    instance
				    (slotd standard-effective-slot-definition))
  (declare (ignore class instance slotd))
  nil)


More information about the Openmcl-devel mailing list