Re: tclkit error on "image create photo"

Pat Thoyts <[email protected]> Fri, 11 Dec 2009 01:09:18 +0000
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <[email protected]>
you need to add package require Tk to your script. wish does an implicit
require Tk as you would only run wush to get Tk. However tclsh and tclkit
both need you to declare your requirement. tclkit avoids loading Tk unless
your program needs it.

On 10 Dec 2009 23:35, "Zbigniew Diaczyszyn" <[email protected]> wrote:

I am working with ActiveState Tcl/Tk 8.5.7. I tried Linux tclkit x86-Version
8.5.1 and Version 8.5.7 from http://www.patthoyts.tk/tclkit/linux-ix86/

My Test-Code is as follows:

-----------------------------------
set button [image create photo -data "
R0lGODlhFAASAKEBAC5Ecv///5sJCQAAACH5BAEAAAMALAAAAAAUABIAAAJCnI+pywoPowQIBDvj
rbnXAIaiSB1WIAhiSn5oqr7sZo52WBrnDPK03oMFZ7nB6TYq7mLBVk0Wg8WUSJuyk2lot9wCADs=
"]

wm title . "Password Gorilla"
wm iconname . "Gorilla"
wm iconphoto . $button
-----------------------------------

$ tclkit sdx.kit qwrap tclkit_test.tcl
5 updates applied

$ tclkit tclkit_test.kit
invalid command name "image"
   while executing
"image create photo -data "
R0lGODlhFAASAKEBAC5Ecv///5sJCQAAACH5BAEAAAMALAAAAAAUABIAAAJCnI+pywoPowQIBDvj
rbnXAIaiSB1WIAhiSn5oqr7sZo52WBrnDPK03oMFZ7nB6T..."
   invoked from within
"set button [image create photo -data "

wish 8.5.7 does not complain and is showing the icon without problems.



--
You received this message because you are subscribed to the "starkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/starkit?hl=en

-- 
You received this message because you are subscribed to the "starkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/starkit?hl=en