[racket] the program can't find image file
hello
I stuck at defining an image with relative path
when I define as (define image (bitmap "run.bmp")), it works only in my
computer
because there is no run.bmp in other people's computer with exactly same
path
and the compiler does not seems to include the image in the distribution
file
but just refer to the absolute path
fortunately I receive an advice about this
but following code doesn't seems to work
could somebody let me know how to define image as relative path? or include
image in the distribution file?
(define-runtime-path hero ".")
(define hero
(bitmap
(path->string (build-path 'same "run.bmp"))))
2010/10/9 Noel Welsh <noelwelsh at gmail.com>
> I made an error.
>
> This
>
> > (define hero (build-path hero "run.bmp"))
>
> should be
>
> (define hero
> (bitmap
> (path->string (build-path hero "run.bmp"))))
>
> HTH,
> N.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101009/28ad2eff/attachment.html>