[racket] absolute path bug

From: 김태윤 (kty1104 at gmail.com)
Date: Sun Oct 10 07:31:27 EDT 2010

hello thank you for your replying and effort

I am sorry to say like this
unfortunately the following code working same as
(bitmap "run.bmp")
it means
1. sourcefile is in c:\
2. run.bmp is in c:\
3. make exe
4. it works!
5. but.. when I change both run.bmp and exe to other folder, it doesn't work
6. image doesn't apear
7. it means, if there is no exactly same directory structure and file, it
would not working in other computer



#lang racket

(require 2htdp/universe)
(require 2htdp/image)

(require racket/gui/base)
(require racket/runtime-path)

(define-runtime-path here ".")

(define hero
 (make-object image-snip%
   (make-object bitmap% (path->string (build-path here "run.bmp")))))

(define (dr n)
  (overlay (scale  (/ (+ (modulo n 90) 1) 10) (rotate (modulo (* n n) 360)
hero)) (square 500 "outline" "blue")))

(animate dr)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101010/d4adb598/attachment.html>

Posted on the users mailing list.