4 Extending the Existing DrScheme Classes
Each of the names:
drscheme:get/extend:extend-interactions-text
drscheme:get/extend:extend-definitions-text
drscheme:get/extend:extend-interactions-canvas
drscheme:get/extend:extend-definitions-canvas
drscheme:get/extend:extend-unit-frame
drscheme:get/extend:extend-tab
is bound to an extender function. In order to change the behavior of drscheme, you can derive new classes from the standard classes for the frame, texts, canvases. Each extender accepts a function as input. The function it accepts must take a class as it’s argument and return a classes derived from that class as its result. For example:
(drscheme:get/extend:extend-interactions-text |
(lambda (super%) |
(class super% |
(public method1) |
...))) |
extends the interactions text class with a method named method1.