From: Kenny Tilton
Subject: How can I hack 'make-instance?
Date: 
Message-ID: <37A7487E.55FDA077@liii.com>
I /think/ I have seen code do this, and it almost seems to work, but
having a very bizarre problem...


I want to code:

   (make-instance 'myClass :copying t)

...where :copying is not a slot or initarg of 'myClass. I want to detect
that in the 'initialize-instance to avoid some heavy lifting there:

(defmethod initialize-instance :after ((DX myClass) &rest iargs)
   (if (cadr (member :copying iargs))
     (trc "DX being copied")
     (progn 
	;heavy lifting
       )

What is so bizarre? This works on some classes but not others (and no
one has a "copying" initarg)...on some I get the error ":copying is not
a valid :initarg...."...no pattern detectible.

1. Well, is this legal anyway? If not, anyone know of a way to interfere
with 'i-i behavior on an ad hoc basis like this?

2. If it is legal (it works a little--I see "DX being copied" in the
trace!), geez, how /do/ i do this? Do I destructively modify the
initargs list in a before method on i-i?! yeeha.

cheers,

ken tilton
clinisys
acl 5.0.1
allegrostore 1.3
nt 4.0