10 drracket:get/extend
Extends the class that is used for the frame that implements the main DrRacket window.
The before argument controls if the mixin is applied before or
after already installed mixins.
If
name-for-changes is a symbol and
drracket:get/extend:allow-re-extension!
has been called (without a subsequent call to
drracket:get/extend:disallow-re-extension!)
then calling this function replaces any earlier mixins that have been added
that have the same name. Otherwise, calling this with the same name
twice is an error and calling it once
drracket:get/extend:get-frame has been
called is an error.
Returns a class whose objects are used for the DrRacket frames.
Once this function is called,
drracket:get/extend:extend-unit-frame
raises an error, disallowing any more extensions.
Like
drracket:get/extend:extend-unit-frame, except it extends the class
that implements the tabs in DrRacket. One is created for each tab
in a frame (each frame always has at least one tab, even if the tab bar is not shown).
Once this is called, re-extension of the mixins described in this
section is not allowed. This is the default state of mixin extension,
but it can be changed by
drracket:get/extend:allow-re-extension!.
This mode is intended to support a faster development cycle, not for production code.
Specifically, the issue is that replacing mixins in this manner does not affect any
objects that have already been create and thus
there can, in general, be a mixture of old and new objects in a single DrRacket.
If some kind of systematic change to the classes is wanted, consider instead using
the racket/surrogate library.
Once an extension happens, newly created objects will use the new mixins.
Mostly, however, creating a new frame will create a new set of all of the objects
that are extended in this section, so that can be used to experiment more quickly
with changes.