<div dir="ltr">I'm using v5.3.3 on OSX. <div><br></div><div style>I found that supplying #f to get/extend, as in -</div><div style>(drracket:get/extend:extend-unit-frame frame-mixin #f)<br></div><div style>works around the issue (which is odd since #f is the default according to the docs).</div>
<div style><br></div><div style>Thanks for the response and fix.</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 1, 2013 at 3:58 PM, Vincent St-Amour <span dir="ltr"><<a href="mailto:stamourv@ccs.neu.edu" target="_blank">stamourv@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">Which version of Racket are you using?<br>
<br>
The current (git) version of Optimization Coach[1] calls `inner' as it<br>
should. I fixed that bug some time ago.<br>
<br>
Sorry for the trouble.<br>
<br>
Vincent<br>
<br>
<br>
[1] Now a PLaneT2 package. Starting with the next Racket release,<br>
Optimization Coach will be distributed separately from Racket.<br>
<br>
<br>
At Mon, 1 Apr 2013 15:15:26 -0700,<br>
Nick Main wrote:<br>
><br>
> [1 <multipart/alternative (7bit)>]<br>
> [1.1 <text/plain; ISO-8859-1 (7bit)>]<br>
<div><div class="h5">> I edited the source for the optimization coach and to comment out the<br>
> "define/augment on-tab-change" and my augment is now working !<br>
><br>
> I will file a bug for this.<br>
><br>
><br>
><br>
> On Mon, Apr 1, 2013 at 2:40 PM, Nick Main <<a href="mailto:david.nick.main@gmail.com">david.nick.main@gmail.com</a>> wrote:<br>
><br>
> > I am writing a DrRacket plugin and want to react to tab changes. I am<br>
> > augmenting the on-tab-change method, as shown below, but this augmentation<br>
> > is not being invoked when tabs are changed.<br>
> ><br>
> > Is there anything obviously wrong with this approach ?<br>
> ><br>
> > I looked through the Racket source and noticed that the optimization coach<br>
> > does not call (inner (void) on-tab-change from-tab to-tab) in its<br>
> > (define/augment (on-tab-change from-tab to-tab)... - but changing the<br>
> > before? argument for my extension to #t does not make a difference, so that<br>
> > may be a red-herring.<br>
> ><br>
> > #lang racket/gui<br>
> > (require drracket/tool)<br>
> ><br>
> > (provide tool@)<br>
> ><br>
> > (define tool@<br>
> > (unit<br>
> > (import drracket:tool^)<br>
> > (export drracket:tool-exports^)<br>
> > (define (phase1) (void))<br>
> > (define (phase2) (drracket:get/extend:extend-unit-frame frame-mixin)<br>
> > #f)<br>
> ><br>
> > (define frame-mixin<br>
> > (mixin (drracket:unit:frame<%>) (drracket:unit:frame<%>)<br>
> ><br>
> > (define/augment (on-tab-change from-tab to-tab)<br>
> > (inner (void) on-tab-change from-tab to-tab)<br>
> > (printf "TAB-CHANGE\n"))<br>
> ><br>
> > (printf "AUGMENTED !\n") ;sanity check<br>
> ><br>
> > (super-new)))))<br>
> ><br>
> > --Nick<br>
> ><br>
</div></div>> [1.2 <text/html; ISO-8859-1 (quoted-printable)>]<br>
><br>
> [2 <text/plain; us-ascii (7bit)>]<br>
> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div><br></div>