1 Implementing Dr Scheme Tools
2 Adding Languages to Dr Scheme
3 Creating New Kinds of Dr Scheme Frames
4 Extending the Existing Dr Scheme Classes
5 Expanding the User’s Program Text and Breaking
6 Editor Modes
7 Language-specific capabilities
8 drscheme: get/ extend
9 drscheme: unit
10 drscheme: language
11 drscheme: language-configuration
12 drscheme: debug
13 drscheme: rep
14 drscheme: frame
15 drscheme: help-desk
16 drscheme: eval
17 drscheme: modes
Index
Version: 4.0.2

 

4 Extending the Existing DrScheme Classes

Each of the names:

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)

        (define (method1 x) ...)

        ...)))

extends the interactions text class with a method named method1.