[racket] absolute path bug

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

thank you for your replying
does your code works in your environment properly?
it works properly when I run without compiling
but when I try to compile, sort of error occur.
so I change my style to
(define hero (bitmap "location of image"))
but it doesn't works either in other computer unless there is file in
exactly same directory structure
the program refer to the absolute path I think.

well.. for my opinion, it should be fixed next version
which way is oriented to making executable easily

2010/10/10 Stephen Bloch <sbloch at adelphi.edu>

> It sounds like what you really want is an .exe file that contains the image
> directly, so you don't have to worry about what directory the .exe file or
> the .bmp file are in.  Fortunately, DrRacket recognizes images as literals:
> you can just copy and paste an image into the source code.  So if I were
> doing this, I would probably write
> (define cauliflower [paste in an image of a cauliflower])
> ...
> (define (dr n)
>  (overlay (scale (/ (+ (modulo n 90) 1) 10)
>                          (rotate (modulo (* n n) 360)
>                                      cauliflower))
>                 (square 500 "outline" "blue")))
> (animate dr)
> Much simpler than using "bitmap" at run-time.
> Stephen Bloch
> sbloch at adelphi.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101010/2de8e727/attachment.html>

Posted on the users mailing list.