<html><head></head><body>Sweet. I'll try that out when I get back to the machine tomorrow. Thanks for the speedy help!<br>
<br>
Best,<br>
jmj <br>
-- <br>
Sent from my Android phone with K-9 Mail.<br><br><div class="gmail_quote">Robby Findler <robby@eecs.northwestern.edu> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre style="white-space: pre-wrap; word-wrap:break-word; font-family: monospace">On Thu, Feb 9, 2012 at 9:12 PM, Eli Barzilay <eli@barzilay.org> wrote:<br />> The other way is what gets you what you want: you need to use<br />> `sandbox-namespace-specs' to make the sandbox share an instance of the<br />> necessary modules between your own code and the sandbox, so that<br />> structs in the sandbox are the same type as your own. Here's a quick<br />> example:<br />><br />> #lang racket<br />> (require racket/sandbox 2htdp/image)<br />> (define ev<br />> (parameterize ([sandbox-namespace-specs<br />> (list make-base-namespace '2htdp/image)])<br />> (make-evaluator 'racket #:requires '(2htdp/image))))<br />> (image? (ev '(rectangle 2 2 'solid 'blue)))<br /><br />This is what I meant by "complex (fiddling with namespaces)" but I see<br />that happily it isn't complex and the sandbox happily
does the<br />fiddling for you.<br /><br />Robby<br /></pre></blockquote></div></body></html>