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}
@chunk[<go>
(printf "passed ~s tests\n" test-count)
(flush-output)
;(printf "passed ~s tests\n" test-count)
;(flush-output)
(let* ([board-size 11]
[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,27 +10,36 @@
(provide game@)
(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@
(import)
(export)
(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.
;; this adds a help button to the world.ss window
(let ([fs (get-top-level-windows)])
(unless (null? fs)
(let ([f (car fs)]
[show-help
(show-scribbling
'(lib "games/scribblings/games.scrbl")
"chat-noir")])
(new button%
[parent f]
[callback (λ (x y) (show-help))]
[label (string-constant help)])))))
(thread
(λ ()
(let loop ([n 0])
(when (n . < . 100)
(sleep 1/10)
(let ([fs (get-top-level-windows)])
(cond
[(null? fs)
(loop (+ n 1))]
[else
(let ([f (car fs)]
[show-help
(show-scribbling
'(lib "games/scribblings/games.scrbl")
"chat-noir")])
(new button%
[parent f]
[callback (λ (x y) (show-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