<div dir="ltr"><div style>I am writing a DrRacket plugin and want to react to tab changes. I am augmenting the on-tab-change method, as shown below, but this augmentation is not being invoked when tabs are changed.</div><div style>
<br></div><div style>Is there anything obviously wrong with this approach ?</div><div style><br></div><div style>I looked through the Racket source and noticed that the optimization coach does not call (inner (void) on-tab-change from-tab to-tab) in its (define/augment (on-tab-change from-tab to-tab)... - but changing the before? argument for my extension to #t does not make a difference, so that may be a red-herring.</div>
<br><div><div>#lang racket/gui</div><div>(require drracket/tool)</div><div> </div><div>(provide tool@)</div><div><br></div><div>(define tool@</div><div> (unit</div><div> (import drracket:tool^)</div><div> (export drracket:tool-exports^)</div>
<div> (define (phase1) (void)) </div><div> (define (phase2) (drracket:get/extend:extend-unit-frame frame-mixin) #f)</div><div> </div><div> (define frame-mixin</div><div> (mixin (drracket:unit:frame<%>) (drracket:unit:frame<%>)</div>
<div> </div><div> (define/augment (on-tab-change from-tab to-tab) </div><div> (inner (void) on-tab-change from-tab to-tab)</div><div> (printf "TAB-CHANGE\n"))</div><div> </div>
<div> (printf "AUGMENTED !\n") ;sanity check</div><div> </div><div> (super-new)))))</div></div><div><br></div><div style>--Nick</div></div>