[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question about MzScheme Objects
Forgive this repeat (I will not do it again), but I got no response.
I define:
(define attr<%> (interface () set-name! pk? set-pk!))
(define attr%
(class* object% (attr<%>) (attr-name (pk #f) (fk #f))
(public
(domain 'integer)
(name attr-name)
(set-name! (lambda (attr-name) (set! name attr-name)))
(pk? (lambda () pk))
(set-pk! (lambda (is-pk) (set! pk is-pk)))
(fk? (lambda () fk)))
(sequence (super-init))))
1) why is there an instance variable fk (and not an instance variable
attr-name)(or maybe there is)?
2) is there a way to default pk and yet set fk?
3) why is fk? not required in the interface?
Thanks,
Alex