[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Method combination
- To: Richard Zippel <rz@natasha.cs.cornell.edu>
- Subject: Re: Method combination
- From: collins@mmm.3m.com (John Collins)
- Date: Mon, 20 Mar 89 17:16:11 CST
- Cc: CommonLoops.PA@Xerox.COM
- In-reply-to: Your message of Fri, 17 Mar 89 16:30:00 EST. <19890317213028.2.RZ@underdog.cs.cornell.edu>
- Redistributed: CommonLoops.PA
> 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