▼ |  | Plugins: Extending Dr Scheme

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 | #lang-specific tools
8 | Language-specific capabilities
9 | drscheme: get/ extend
10 | drscheme: unit
11 | drscheme: language
12 | drscheme: language-configuration
13 | drscheme: debug
14 | drscheme: rep
15 | drscheme: frame
16 | drscheme: help-desk
17 | drscheme: eval
18 | drscheme: modes
| Index

top ← prev up next →

### 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)
( define (method1 x) ... )
... )))

extends the interactions text class with a method named method1.
top ← prev up next →