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

Re: Method combination



> I must be confused or I've missed some thing in the release notes that I
> should have seen.  I'm trying to include some code that runs when an
> instance of a class is created (using the CLOS style initialization
> protocol).  If I define an class as follows, and create it with 
> (pcl:*make-instance 'foo), GOTCHA is printed, but not FOO-INITIALIZED.
> What happened?  (This is using a 
> Rel 7.2, 12/7/88   Can't think of a cute name PCL.)
> 
> (defclass foo ()
>      ())
> 
> (defmethod *initialize-instance :after ((object foo) &rest ignore)
> 	   (print 'foo-initialized))
> 
> (defmethod print-object :after ((object foo) stream)
> 	   (Print 'gotcha))

The last time that happened to me, it was because I had neglected to
import pcl::*initialize-instance.  I had simply created another generic
function called *initialize-instance in the current package.

					John Collins, 3M Company
					collins@mmm.3M.com