moved the literate version of chat noir over so it is used by plt-games now

svn: r13776
This commit is contained in:
Robby Findler 2009-02-21 17:30:07 +00:00
parent 121764e7b5
commit a66ed082fb
4 changed files with 27 additions and 1651 deletions

View File

@ -2183,8 +2183,8 @@ for the other functions in this document
@section{Run, program, run} @section{Run, program, run}
@chunk[<go> @chunk[<go>
(printf "passed ~s tests\n" test-count) ;(printf "passed ~s tests\n" test-count)
(flush-output) ;(flush-output)
(let* ([board-size 11] (let* ([board-size 11]
[initial-board [initial-board

View File

@ -1,5 +0,0 @@
(module chat-noir-module lang/htdp-intermediate-lambda
(require (lib "world.ss" "htdp"))
; (require "hash.ss")
(require (lib "include.ss" "scheme"))
(include "chat-noir.ss"))

View File

@ -10,21 +10,25 @@
(provide game@) (provide game@)
(define orig-namespace (current-namespace)) (define orig-namespace (current-namespace))
(define-runtime-path chat-noir "chat-noir-module.ss") (define-runtime-path chat-noir "chat-noir-literate.ss")
(define-unit game@ (define-unit game@
(import) (import)
(export) (export)
(define ns (make-base-namespace)) (define ns (make-base-namespace))
(parameterize ([current-namespace ns])
(namespace-attach-module orig-namespace '(lib "mred.ss" "mred"))
(namespace-attach-module orig-namespace '(lib "class.ss" "scheme"))
(dynamic-require chat-noir #f))
;; a hack. ;; a hack.
;; this adds a help button to the world.ss window ;; this adds a help button to the world.ss window
(thread
(λ ()
(let loop ([n 0])
(when (n . < . 100)
(sleep 1/10)
(let ([fs (get-top-level-windows)]) (let ([fs (get-top-level-windows)])
(unless (null? fs) (cond
[(null? fs)
(loop (+ n 1))]
[else
(let ([f (car fs)] (let ([f (car fs)]
[show-help [show-help
(show-scribbling (show-scribbling
@ -33,4 +37,9 @@
(new button% (new button%
[parent f] [parent f]
[callback (λ (x y) (show-help))] [callback (λ (x y) (show-help))]
[label (string-constant help)]))))) [label (string-constant help)]))]))))))
(parameterize ([current-namespace ns])
(namespace-attach-module orig-namespace '(lib "mred.ss" "mred"))
(namespace-attach-module orig-namespace '(lib "class.ss" "scheme"))
(dynamic-require chat-noir #f)))

File diff suppressed because it is too large Load Diff