macro-stepper: fix reset/obsolete/shutdown behavior
This commit is contained in:
parent
3dc78a3d1e
commit
a1c7c2b6f9
|
@ -187,18 +187,6 @@
|
|||
|
||||
;; ----
|
||||
|
||||
(define current-stepper-director #f)
|
||||
|
||||
(define/public (obsolete-macro-debugger)
|
||||
(when current-stepper-director
|
||||
(send current-stepper-director add-obsoleted-warning))
|
||||
(when current-stepper-director
|
||||
(send current-stepper-director add-obsoleted-warning)
|
||||
(send current-stepper-director shutdown)
|
||||
(set! current-stepper-director #f)))
|
||||
|
||||
;; --
|
||||
|
||||
(define/public-final (run-macro-stepper)
|
||||
|
||||
;; FIXME!!! Lots of this is copied out of drracket/private/syncheck/gui.rkt
|
||||
|
@ -230,11 +218,11 @@
|
|||
;; --
|
||||
|
||||
(define director
|
||||
(parameterize ((current-eventspace drs-eventspace)
|
||||
(current-custodian drs-custodian))
|
||||
(parameterize ((current-eventspace drracket-eventspace)
|
||||
(current-custodian drracket-custodian))
|
||||
(let ([filename (send definitions-text get-filename/untitled-name)])
|
||||
(new drracket-macro-stepper-director% (filename filename)))))
|
||||
(set! current-stepper-director director)
|
||||
(send interactions-text set-macro-stepper-director director)
|
||||
|
||||
(define (the-module-name-resolver . args)
|
||||
(parameterize ((current-expand-observe void))
|
||||
|
@ -415,7 +403,8 @@
|
|||
(let ([win (get-top-level-window)])
|
||||
;; should only be #f when win is #f
|
||||
(when (is-a? win drracket:unit:frame<%>)
|
||||
(send win obsolete-macro-debugger)))))
|
||||
(send (send win get-interactions-text)
|
||||
obsolete-macro-stepper)))))
|
||||
|
||||
;; Catch program changes and mark macro stepper obsolete.
|
||||
(define/augment (on-insert x y)
|
||||
|
@ -433,14 +422,23 @@
|
|||
;; Catch reset => obsolete macro stepper
|
||||
(define (macro-debugger-interactions-text-mixin %)
|
||||
(class %
|
||||
(super-new)
|
||||
(define current-stepper-director #f)
|
||||
(inherit get-top-level-window)
|
||||
(super-new)
|
||||
|
||||
(define/override (reset-console)
|
||||
(super reset-console)
|
||||
(let ([win (get-top-level-window)])
|
||||
(when (is-a? win drracket:unit:frame<%>)
|
||||
(send win obsolete-macro-debugger))))
|
||||
(obsolete-macro-stepper)
|
||||
(when current-stepper-director
|
||||
(send current-stepper-director shutdown)
|
||||
(set! current-stepper-director #f))
|
||||
(super reset-console))
|
||||
|
||||
(define/public (obsolete-macro-stepper)
|
||||
(when current-stepper-director
|
||||
(send current-stepper-director add-obsoleted-warning)))
|
||||
|
||||
(define/public (set-macro-stepper-director director)
|
||||
(set! current-stepper-director director))
|
||||
))
|
||||
|
||||
;; Macro debugger code
|
||||
|
|
Loading…
Reference in New Issue
Block a user