Corrected bug in test display and custodians shutting down windows. (Had accidentally put the gui actions back on the user's eventspace)
Commit is for the release svn: r12493
This commit is contained in:
parent
ce734b819c
commit
cc25f3852f
|
@ -28,7 +28,7 @@
|
|||
(dynamic-require the-file 'id))])
|
||||
(apply orig-fn x)))
|
||||
...)]))
|
||||
|
||||
|
||||
(dr "compile.ss"
|
||||
compile-java compile-interactions compile-files compile-ast compile-interactions-ast
|
||||
compilation-unit-code compilation-unit-contains set-compilation-unit-code!
|
||||
|
@ -763,11 +763,12 @@
|
|||
(send collect-coverage enable #f))
|
||||
(install-classpath (profj-settings-classpath settings))])))
|
||||
|
||||
(define eventspace (current-eventspace))
|
||||
(define/public (front-end/complete-program port settings)
|
||||
(mred? #t)
|
||||
(let ([name (object-name port)]
|
||||
[rep (drscheme:rep:current-rep)]
|
||||
[eventspace (current-eventspace)]
|
||||
#;[eventspace (current-eventspace)]
|
||||
[execute-types (create-type-record)])
|
||||
(let ([name-to-require #f]
|
||||
[require? #f]
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
(lambda () (put-preferences '(test:test-window:docked?) '(#f)) #f))))
|
||||
|
||||
(define/public (report-success)
|
||||
(printf "calling report-success~n")
|
||||
(when current-rep
|
||||
(unless current-tab
|
||||
(set! current-tab (send (send current-rep get-definitions-text) get-tab)))
|
||||
|
@ -40,25 +39,20 @@
|
|||
(set! drscheme-frame (send current-rep get-top-level-window)))
|
||||
(let ([curr-win (and current-tab (send current-tab get-test-window))]
|
||||
[content (make-object (editor:standard-style-list-mixin text%))])
|
||||
(printf "current-tab ~a , curr-win ~a ~n" current-tab curr-win)
|
||||
(send this insert-test-results content test-info src-editor)
|
||||
(printf "inserted test results~n")
|
||||
(send content lock #t)
|
||||
(printf "locked content~n")
|
||||
(when curr-win (send curr-win update-editor content))
|
||||
(printf "updated test-window editor~n")
|
||||
(when current-tab (send current-tab current-test-editor content))
|
||||
(printf "editors updated~n")
|
||||
(when (and curr-win (docked?))
|
||||
(send drscheme-frame display-test-panel content)
|
||||
#;(send curr-win show #f))
|
||||
(printf "done~n"))))
|
||||
)))
|
||||
|
||||
(define/public (display-results)
|
||||
(let* ([curr-win (and current-tab (send current-tab get-test-window))]
|
||||
[window (or curr-win (make-object test-window%))]
|
||||
[content (make-object (editor:standard-style-list-mixin text%))])
|
||||
|
||||
|
||||
(send this insert-test-results content test-info src-editor)
|
||||
(send content lock #t)
|
||||
(send window update-editor content)
|
||||
|
@ -116,7 +110,7 @@
|
|||
[(zero? failed-checks) (format "All ~as passed!\n\n" ck)]
|
||||
[(= failed-checks total-checks) (format "0 ~as passed.\n" ck)]
|
||||
[else (format "~a of the ~a ~as failed.\n\n"
|
||||
failed-checks ck total-checks)]))))])
|
||||
failed-checks total-checks ck)]))))])
|
||||
(case style
|
||||
[(test-require)
|
||||
(test-outcomes "This program must be tested!\n")
|
||||
|
@ -236,7 +230,6 @@
|
|||
(super-instantiate
|
||||
((string-constant test-engine-window-title) #f 400 350))
|
||||
|
||||
#;(define editor #f)
|
||||
(define switch-func void)
|
||||
(define disable-func void)
|
||||
(define close-cleanup void)
|
||||
|
@ -256,14 +249,6 @@
|
|||
(when (eq? 'button (send c get-event-type))
|
||||
(close-cleanup)
|
||||
(send this show #f))))
|
||||
#;(make-object button%
|
||||
(string-constant profj-test-results-close-and-disable)
|
||||
button-panel
|
||||
(lambda (b c)
|
||||
(when (eq? 'button (send c get-event-type))
|
||||
(disable-func)
|
||||
(close-cleanup)
|
||||
(send this show #f))))
|
||||
(make-object button%
|
||||
(string-constant dock)
|
||||
button-panel
|
||||
|
@ -276,7 +261,6 @@
|
|||
(make-object grow-box-spacer-pane% button-panel)))
|
||||
|
||||
(define/public (update-editor e)
|
||||
#;(set! editor e)
|
||||
(send content set-editor e))
|
||||
|
||||
(define/public (update-switch thunk)
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
(fprintf port "Tests disabled.\n")]))
|
||||
|
||||
(define/private (display-success port event count)
|
||||
#;(when event
|
||||
(when event
|
||||
(parameterize ([(dynamic-require 'scheme/gui 'current-eventspace) event])
|
||||
((dynamic-require 'scheme/gui 'queue-callback)
|
||||
(lambda () (send test-display report-success)))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user