Given that I have class definitions :
(define-class <foo> ()
(slot1 etc...))
(define-class <foo-bar> ()
(foo-slot :init-keyword :foo-slot)
(other slots...))
I can then initialize an instance of foo-bar with an existing foo object :
e.g.
(define make-foo-bar
(lambda (foo-obj args)
(make <foo-bar> :foo-slot foo-obj)))
It appears that the "foo-bar" slot now holds a reference to the intializing
object. So if I do this with multiple foo-bar objects and then change the
value of slot in the foo object the change will be reflected in all of the
foo-bar objects.
This is actually what I want...but, if I didn't want this to happen how
would I set up the foo-bar object with a local copy of foo ?
Or more exactly - how would I do this without explicitly making a new foo
object and copying all of the data from the "initializer" object to the new
local copy (i.e. automagically).
I'm kinda new at this so I hope the question makes sense...
--
Brian Denheyer
briand_at_northwest.com
Received on Tue Dec 24 1996 - 03:58:56 CET