[CM] problem with defobject?

Joshua Parmenter joshp@u.washington.edu
Wed, 17 Nov 2004 09:43:36 -0800


Hi everyone,

I'm sorry if this has been discussed, but it seems like there is a 
problem with defobject in CM 2.4.2, using openmcl on MacOS X.

Here is the code example with CM's output:

(defobject ex3 (i)
   (freq)
   (:parameters ins time dur freq))

(new ex3 :freq 440)

;; returns this

? ? #i(ex3 freq 440)

;; However, if I try to re-define the object with a change
;; (just a simple example)

(defobject ex3 (i)
   (freq amp)
   (:parameters ins time dur freq amp))

(new ex3 :freq 440 :amp 1)

;; this error is returned

? ? > Error in process listener(2): :AMP is an invalid initarg to 
INITIALIZE-INSTANCE for #<PARAMETERIZED-CLASS EX3>.
 >                               Valid initargs: #(:TIME :INS :DUR 
:FREQ).
 > While executing: CCL::CHECK-INITARGS
 > Type :POP to abort.
Type :? for other options.
1 >

Any ideas why re-evaluating the defobject doesn't seem to overwrite the 
previous one?

Thanks in advance,

Josh