[plt-scheme] Object system
Hi,
I don't know the proper terminology, what I'd like to do is this:
I'd like to create a new class derived from one of MrEDs class, overwrite the, for instance, on-subwindow-char method, but still make a call within the new method to the super method.
What is the proper procedure to do this, can it be done?
As an example:
(define my-text-field%
(class text-field%
(rename (sup on-subwindow-char))
(define/override-final on-subwindow-char
(lambda (x y)
(display y)
(newline)
(sup x y)))
(super-instantiate ())))
This only works to a certain extent, I have to call "sub" at the very end otherwise it won't work.
Best regards
Guenther
P.S. I do have Chapter 4 (about class.ss) printed but I'm not sure how to interpret it.