On 10/3/2021 4:04 PM, 'William J. Bowman' via Racket Users wrote:
I'm trying to run sandboxes in places, but when the sandboxes need access to 
racket/gui (such as through 2htdp/universe), they get `cannot instantiate 
racket/gui/base' a second time`. I've tried initing racket/gui once in the 
server that starts the places, but this doesn't seem to work. (gui-available?) 
is still false in started places, and they still raise the exception when the 
sandbox tries to load the gui module.

I don't really need to run gui code in the sandbox, so I'm guessing the best 
workaround is to override `2htdp/universe` in the sandbox.

Anyone have either a solution, or a better workaround?

My (perhaps incorrect) understanding is that with dynamic (kernel thread) places, only the foreground place can have a GUI.  I'm not sure why the gui package won't load in a background place, but it may not work right even if you can get it to load.

Just a suggestion: you might try using Paulo Matos's "Loci" package - it simulates dynamic places using separate processes.  With Loci, the place is foreground in its own process, so it /might/ allow racket/gui to work.

https://pkgs.racket-lang.org/package/loci


Hope this doesn't lead down a rabbit hole.
George

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/8079cbe0-3f78-e0f3-024f-9b47459b8706%40comcast.net.

Reply via email to