[racket] Load Showimage

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Thu Jan 6 19:53:04 EST 2011

On 1/6/11 7:46 PM, Sayth Renshaw wrote:
> On Fri, Jan 7, 2011 at 11:17 AM, David Van Horn <dvanhorn at ccs.neu.edu
> <mailto:dvanhorn at ccs.neu.edu>> wrote:
>     On 1/6/11 7:11 PM, Sayth Renshaw wrote:
>         Would it be possible to get the image SDL_image library added to
>         planet
>         racket? that way I could require the package and use it. Currently
>         cannot do the examples from the first page of HTDP2e because I
>         cannot
>         use the SDL_image library.
>     You don't need SDL_image to run the examples from HTDP2e.
>     If you're reading the HTDP2e, right-click the rocket image, select
>     "Copy Image" (or something equivalent for your browser).  Then, in
>     the DrRacket definitions window, right-click and select "Paste".
>     Does that help?
>     David
> No the test example fails. It states to run this code after library is
> loaded(haven't been able to load library) and it gives this error.
>   (* (image-width )
>       (image-height ))
> and it gives this error.
> image-width: name is not defined, not a parameter, and not a primitive name
> meaning to me that the library isn't loaded.

Add the following to the top of your program:

(require 2htdp/image)

[There is a margin note to this effect in the Draft version of HTDP2e 
Matthias referred you to -- make sure that's what you're reading.]


Posted on the users mailing list.