[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tracing SETF on structures
Howdy,
We have a structure defined by
(DEFSTRUCT NP-RECORD
...
RELATED-NP
...)
and we would like to be able to set up tracing so that we can see
whenever the RELATED-NP field of an NP-RECORD is changed, i.e.,,
whenever a form such as
(SETF (NP-RECORD-RELATED-NP <np-record>)
<new-value>)
is executed. In Section 5.4 of the Allegro CL Common Lisp User Guide
(Version 4.1, March 1992, page 5-29), the following example is given:
(trace ((method (setf slot-1) (t baz))))
(trace ((method foo :before (integer))))
(trace ((method foo :after (integer))))
Unfortunately, I am unable to interpret how I can use this example to
set up the tracing I want. In particular, I'm not sure what SLOT-1,
and (T BAZ) mean.
Taking a guess at a mapping, I tried the following
(trace ((method (setf related-np) (t np-record))))
but this yielded:
Error: (METHOD (SETF RELATED-NP) (T NP-RECORD)) does not have a function
definition
Can anyone help me figure out how to set up the desired tracing?
Thanks, in advance, for any assistance.
Joe.