<div dir="ltr">If I understand correctly, you need to actually make a drracket plugin, since you want to change the way DrRacket behaves. DrRacket does let you customize some things by specifying properties as part of a new #lang, but not arbitrary mixins of the definitions text.<div>
<br></div><div>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 23, 2013 at 5:48 PM, Jonathan Schuster <span dir="ltr"><<a href="mailto:schuster@ccs.neu.edu" target="_blank">schuster@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>I'm currently trying to write a #lang with a built-in analysis visualization in DrRacket. The idea is that when I open a program written in this #lang, a "Run Analysis" button should appear. When the button is clicked, it should run the analysis and draw syntax-check-like arrows in the definitions window to show the results of the analysis.<br>
<br></div>To do this, I'm using some code Ryan Culpepper wrote as part of the macro-debugger collection that provides a mixin for drawing arrows. The problem is that when I try to extend DrRacket using drracket:get/extend:extend-definitions-text, I get the "cannot instantiate `racket/gui/base' a second time in the same process" error. Here's a trimmed down version of the code:<br>
<br></div>;; tool-lang-example/main.rkt:<br><br>#lang racket<br><br>(provide (all-from-out racket)<br> get-info)<br><br>(require drracket/tool-lib)<br><br>(define (get-info info-kind default-value default-filter)<br>
(default-filter info-kind default-value))<br><br>(drracket:get/extend:extend-definitions-text (lambda (x) x))<br><br></div>;; tool-lang-example/lang/reader.rkt:<br><br>#lang s-exp syntax/module-reader tool-lang-example #:info get-info<br>
<br>(require tool-lang-example)<br><br>;; --<br><br></div>I also tried using lazy-require for drracket/tool-lib, but to no avail.<br><br></div>Is it possible to get this to work just as a #lang, without creating a separate tool?<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></div><span class="HOEnZb"><font color="#888888">-Jonathan<br><div><div><div><div><div><div><br></div></div></div></div></div></div></font></span></div>
<br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>