diff --git a/collects/2htdp/private/check-aux.rkt b/collects/2htdp/private/check-aux.rkt index 35a0408e35..896ae61614 100644 --- a/collects/2htdp/private/check-aux.rkt +++ b/collects/2htdp/private/check-aux.rkt @@ -136,7 +136,8 @@ ;; InPort OutPort (U #f String) -> Void ;; register with the server (define (tcp-register in out name) - (tcp-send out `(REGISTER ((name ,(if name name (symbol->string (gensym 'world))))))) + (define msg `(REGISTER ((name ,(if name name (symbol->string (gensym 'world))))))) + (tcp-send out msg) (define ackn (tcp-receive in)) (unless (equal? ackn '(OKAY)) (raise tcp-eof))) diff --git a/collects/2htdp/private/universe.rkt b/collects/2htdp/private/universe.rkt index 5e77845d5c..f4eca8f378 100644 --- a/collects/2htdp/private/universe.rkt +++ b/collects/2htdp/private/universe.rkt @@ -234,9 +234,9 @@ ;; IPort OPort Sexp -> IWorld (define (create-iworld i o info) - (if (and (pair? info) (string? (car info))) - (make-iworld i o (car info) (cdr info)) - (make-iworld i o (symbol->string (gensym 'iworld)) info))) + (if (string? info) + (make-iworld i o info "info field not available") + (make-iworld i o (symbol->string (gensym 'iworld)) "info field not available"))) ;; Player S-exp -> Void (define (iworld-send p sexp) diff --git a/collects/2htdp/uchat/server.rkt b/collects/2htdp/uchat/server.rkt index 0049cc31cf..0fe94178a8 100644 --- a/collects/2htdp/uchat/server.rkt +++ b/collects/2htdp/uchat/server.rkt @@ -1,6 +1,6 @@ -;; The first three lines of this file were inserted by DrScheme. They record metadata +;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. -#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname server) (read-case-sensitive #f) (teachpacks ()) (htdp-settings #(#f constructor repeating-decimal #f #t none #f ()))) +#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname server) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) (require 2htdp/universe) ;; UniState = [Listof IWorld] @@ -91,10 +91,10 @@ ;; Any -> Universe ;; run the chat server -(define (run _) +(define (run debug) (universe '() - (state true) + (state debug) (on-new new-chatter) (on-msg forward))) -(run 0) +(run #true)