You can use loggers for this. The `data` argument to `log-message`
allows payloads to be carried along with log messages. Just have the
user program log messages with a particular topic, and have the tool
listen on that topic.
That's how the optimization coach (which is a DrRacket tool) gets info
from the the user program.
On Tue, 16 May 2017 11:38:32 -0500,
'John Clements' via Racket Users wrote:
> Austin Sparks (cc:ed) and I are struggling with what I believe should be a
> pretty simple problem; how can we share a value between a DrRacket tool and a
> user’s program? Specifically, the value in question here is a channel
> (probably an asynchronous channel) on which the user’s thread can place
> musical-note-to-be-played values.
> The heavyweight way―I’m pretty confident this would work―is to provide our
> own “run” button, allowing us to add existing module invocations to the
> user’s namespace before the user’s module is expanded or invoked. However,
> I’m thinking there’s … an easier way to do it?
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.