(module no-brainer-vc mzscheme
(require (lib "unitsig.ss")
(lib "no-brainer-sig.ss" "no-brainer")
(lib "mred.ss" "mred")
(lib "class.ss")
(lib "framework.ss" "framework"))
(provide no-brainer-vc@)
(define no-brainer-vc@
(unit/sig no-brainer-vc^
(import (drs-window))
(define (receive-string result)
(send-output-to-debugger-window result debugger-output))
(define debugger-output (make-output-window drs-window))
))
(define (make-output-window drs-window)
(let* ([frame (instantiate frame:basic% ()
(label "Here's what's wrong with your stupid program")
(width 400)
(height 400))]
[canvas (instantiate canvas:basic% () (parent (send frame get-area-container)))]
[text (instantiate text:basic% ())])
(send canvas set-editor text)
(send frame show #t)
text))
(define (send-output-to-debugger-window str text)
(send text insert str (send text last-position))))