[plt-scheme] Bitmap Probleme

From: sly (sly at southeastern.zz.vg)
Date: Thu May 20 06:45:30 EDT 2004


I need to create in a frame buttons with pict as bitmap label. I use Plt
Drscheme 206.
I tested 3 solutions, they work all under Windows but none goes under mac
nor linux.
I noticed that plt drcheme accepts the bmp.
1st solution.

 (define lol (make-object bitmap% (build-path (current-directory) "img"
 "reload.bmp") 'bmp))
  (define test (new button%
                  (label lol) (parent bar) (callback (lambda (O E) (reload O

 2nd solution.

 (define toto
 (make-object button% (make-object bitmap% (build-path (current-directory)
 "img" "reload.bmp") 'bmp) bar reload))

 3rd solution.

 (define lol (make-object bitmap% (build-path (current-directory) "img"
 "reload.bmp") 'bmp))
 (define bouton-contrer (instantiate button% () (label lol) (parent bar)
                               (callback (lambda (O E)
                                           (reload O E)))))

Error seems to come from the bitmap.

initialization in button%: bad bitmap: #<struct:bitmap%>

In all case, the bitmap failed.
I need that picts are in bmp
My module is declared by the following way.

(module my-module-name mzscheme
   (lib "mred.ss" "mred")
    (lib "class.ss")
   (lib "string.ss" "srfi/13")
   (lib "browser.ss" "browser" )
    (lib "url.ss" "net")
   (lib "string.ss")
   (lib "framework.ss" "framework"))

How could I to correct my problem?
Thank's a lot


Posted on the users mailing list.