A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.racket-lang.org/tools/drracket_module-language-tools.html below:

23 drracket:module-language-tools

Call this function to add another button to DrRacket’s toolbar. When buttons are added this way, DrRacket monitors the

#lang

line at the top of the file; when it changes DrRacket queries the language to see if this button should be included. These buttons are “opt out”, meaning that if the language doesn’t explicitly ask to not have this button (or all such buttons), the button will appear. See

drracket:opt-out-toolbar-buttons

for more information.

Added in version 1.6 of package drracket-core-lib.

The procedure id from mod-path is loaded by dynamic-require into a specially designed separate place. When DrRacket detects that the editor has been modified, it sends the contents of the editor over to that separate place, expands the program there, and then supplies the fully expanded object to that first procedure. (The procedure is called in the same context as the expansion process.)

If the expansion raises an exception, then that exception is supplied as the first argument instead of the syntax object. If a non-exn? is raised, or if the expansion process is terminated (e.g. via custodian-shutdown-all called during expansion), then the expansion monitor is not notified.

The contract for that procedure is

There are three other arguments:

The result of the procedure is expected to be something that can be sent across a

place-channel

, which is then sent back to the original place where DrRacket itself is running and passed to the

local-handler

argument. At this point, the only code running is trusted code (DrRacket itself and other tools), but any long running computations may freeze DrRacket’s GUI, since this procedure is invoked on DrRacket’s eventspace’s handler thread.

Registers a pair of procedures with DrRacket’s online expansion machinery.

Like drracket:module-language-tools:add-online-expansion-handler, the first two arguments specify a procedure that is called in the separate place designated for expansion.

The procedure is called before expansion starts and once it returns, expansion begins. The procedure should match this contract:

The expectation is that this procedure creates a thread and monitors the expansion process, sending back information to the main place while expansion is progressing.

The local-handler procedure is called each time the (-> any/c void?) procedure (described just above) is called. It is also called each time an expansion starts; it receives a value that returns #t from drracket:module-language-tools:start? in that case.

To help with debugging, DrRacket logs progress and recovers from some errors that happen when running the handler procedures. To monitor its progress, monitor the

'debug

level of the

logger

with the topic

'drracket-background-compilation

.

Registers func so that it is called while building the preferences panel. The function is passed a panel that contains other configuration controls for online expansion.

Used to inform a monitor-based handler that the online expansion has finished.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4