[racket-dev] Shared-instantiation modules

From: John Clements (clements at brinckerhoff.org)
Date: Fri Sep 10 15:21:00 EDT 2010

Seems like a FAQ, but:

I want to associate a single "sound player" with a drscheme process.  When student code runs, it needs to send messages to that sound player.  I want to make sure there's only one running at a time.

The first thing that pops into my head is some kind of "shared-require" form, but I don't see such a thing.

The second thing that pops into my head is a tool; I understand how I can set up a tool so that it gets run only once at startup, and creates a value that gets associated with every DrRacket frame.  Unfortunately, I can't figure out the second part of the equation: how does a user program then connect to the DrRacket frame to get the value? I don't want to make the user click some extra button every time they run their program, and I *really* don't want to mess around with language levels and manipulating the user's source code.

Basically, I just want a process-level global value.  I must be missing something really obvious, here.

Thanks,

John



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4669 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20100910/2a59c905/attachment.p7s>

Posted on the dev mailing list.