[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
setter problem
- To: info-dylan@cambridge.apple.com
- Subject: setter problem
- From: thant@void.esd.sgi.com
- Date: Mon, 26 Oct 92 11:35:30 PST
- Cc: thant@void.esd.sgi.com
Why doesn't this work?
(define-class <foo> (<object>)
(a)
(b))
;Value: <foo>
(define foo (make <foo>))
;Value: foo
((setter a) foo "apple")
;Value: "apple"
((setter b) foo "ball")
;Value: "ball"
(define-method see-foo (m (f <foo>))
(m f))
;Value: see-foo
(see-foo a foo)
;Value: "apple"
(see-foo b foo)
;Value: "ball"
(define-method set-foo (m (f <foo>) i)
((setter m) f i))
;Value: set-foo
(set-foo a foo "aardvark")
;Error: unbound variable dylan:setter/m/