From 3b609eef10fd0f72745cb720ee4c92f0521e59a2 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 28 Aug 2010 23:46:31 -0400 Subject: [PATCH] use .rkt suffix => avoid a bug when trying to show the file --- collects/slideshow/initial-ones.rkt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/collects/slideshow/initial-ones.rkt b/collects/slideshow/initial-ones.rkt index 719a2698e2..d6125d0488 100644 --- a/collects/slideshow/initial-ones.rkt +++ b/collects/slideshow/initial-ones.rkt @@ -8,9 +8,13 @@ slideshow/code mred scheme/class + racket/path + racket/runtime-path (only-in mzlib/etc begin-with-definitions this-expression-source-directory)) +(define-runtime-path tutorial-show "tutorial-show.rkt") + (provide do-initial-slides) (define (do-initial-slides) @@ -146,7 +150,7 @@ "be viewed while reading the program source") (blank) (para #:width client-w "The source is") - (let ([s (path->string (build-path (this-expression-source-directory) "tutorial-show.ss"))]) + (let ([s (path->string tutorial-show)]) (clickback (scale/improve-new-text (let ([p (tt s)]) @@ -156,16 +160,13 @@ "blue")) (min 1 (/ (* 0.8 client-w ) (pict-width (tt s))))) (lambda () - (let* ([f (new frame% - [label "tutorial-show.ss"] - [width 600] - [height 400])] + (let* ([f (new frame% [label (path-element->string + (file-name-from-path tutorial-show))] + [width 600] [height 400])] [e (new text%)] - [c (new editor-canvas% - [parent f] - [editor e])]) + [c (new editor-canvas% [parent f] [editor e])]) (send e load-file s) - (send e change-style + (send e change-style (make-object style-delta% 'change-family 'modern) 0 'end) (send f show #t))))))