Re: Icons
Bill Ramsay <ramsayw1 <at> verizon.net>
2006-08-20 13:34:30 GMT
Felip Alàez Nadal wrote:
Hello:
The code I send just creates a button with an image on It. Be
sure to run It from within the directory It creates.
--
Felip Alàez Nadal
_______________________________________________
ltk-user site list
ltk-user <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/ltk-user
When I try to run it I get the following error:
debugger invoked on a SB-INT:STREAM-ENCODING-ERROR:
encoding error on stream #<SB-SYS:FD-STREAM for "descriptor 6"
{9E04D39}>
(:EXTERNAL-FORMAT :ASCII):
the character with code 242 cannot be encoded.
However, I pretty much do the same thing you are doing:
(let*
((img
(xbut (make-instance 'button :master nil
:image
(image-load img "x.ppm")))...
In this case I get an error because img is nil. In your code, you
do basically the same thing with the variable imatge.
I have tried making img a photo-image with (img (make-image)), and in
that case the error goes away but the button appears with no image in
it (and no other errors). (I've used the ppm image before, so I know
it's a good image).
I should note that I'm running this in SBCL on an AMD64 laptop running
linux.
I'm sure this works. I just can't figure out what I'm doing wrong.
Bill
<div>
Felip Alàez Nadal wrote:
<blockquote cite="mid212b76500608191353p2cf5a2eake169576172e1a2ae <at> mail.gmail.com" type="cite">
<div>Hello:</div>
<div>The code I send just creates a button with an image on It. Be
sure to run It from within the directory It creates. <br><br>
-- <br>
Felip Alàez Nadal </div>
_______________________________________________
ltk-user site list
<a class="moz-txt-link-abbreviated" href="mailto:ltk-user <at> common-lisp.net">ltk-user <at> common-lisp.net</a>
<a class="moz-txt-link-freetext" href="http://common-lisp.net/mailman/listinfo/ltk-user">http://common-lisp.net/mailman/listinfo/ltk-user</a>
</blockquote>
When I try to run it I get the following error:<br><br>
debugger invoked on a SB-INT:STREAM-ENCODING-ERROR:<br>
encoding error on stream #<SB-SYS:FD-STREAM for "descriptor 6"
{9E04D39}><br>
(:EXTERNAL-FORMAT :ASCII):<br>
the character with code 242 cannot be encoded.<br><br>
However, I pretty much do the same thing you are doing:<br><br>
(let*<br>
((img<br>
<br>
(xbut (make-instance 'button :master nil<br>
:image
(image-load img "x.ppm")))...<br><br>
In this case I get an error because img is nil. In your code, you
do basically the same thing with the variable imatge.<br>
I have tried making img a photo-image with (img (make-image)), and in
that case the error goes away but the button appears with no image in
it (and no other errors). (I've used the ppm image before, so I know
it's a good image).<br><br>
I should note that I'm running this in SBCL on an AMD64 laptop running
linux.<br><br>
I'm sure this works. I just can't figure out what I'm doing wrong.<br><br>
Bill<br>
</div>