For Programmers: Free Programming Magazines  


Home > Archive > Tcl > June 2004 > ico files in starkits









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ico files in starkits
Chris Nelson

2004-06-24, 1:01 am

Bit by bit I'm getting my starkit working. Now I'm having trouble
with 'Windows icons. My script includes:

wm iconbitmap $w m2.ico

which works fine with m2.ico in the directory next to my script when I
run it in wish but doesn't fine the icon file when run in the starkit.
So I tried:

wm iconbitmap $w [file join $starkit::topdir lib app-myapp m2.ico]

and I get:

bitmap "C:/.../my-app.exe/lib/app-myapp/m2.ico" not defined

So, how do I get [wm iconbitmap] to work with VFS?
Robert

2004-06-24, 1:01 am

"Chris Nelson" <cnelson@nycap.rr.com> wrote in message
news:9245c0ba.0406201621.7ad8b01@posting.google.com...
> Bit by bit I'm getting my starkit working. Now I'm having trouble
> with 'Windows icons. My script includes:
>
> wm iconbitmap $w m2.ico
>
> which works fine with m2.ico in the directory next to my script when I
> run it in wish but doesn't fine the icon file when run in the starkit.
> So I tried:
>
> wm iconbitmap $w [file join $starkit::topdir lib app-myapp m2.ico]
>
> and I get:
>
> bitmap "C:/.../my-app.exe/lib/app-myapp/m2.ico" not defined
>
> So, how do I get [wm iconbitmap] to work with VFS?

Please please someone answer this. I have asked on different newsgroups
about how to structure an application so that all the icons and images it
uses are included in the kit.

Robert


Benjamin Riefenstahl

2004-06-24, 1:01 am

Hi Chris,


cnelson@nycap.rr.com (Chris Nelson) writes:
> Bit by bit I'm getting my starkit working. Now I'm having trouble
> with 'Windows icons. My script includes:
>
> wm iconbitmap $w m2.ico
>
> which works fine with m2.ico in the directory next to my script when
> I run it in wish but doesn't fine the icon file when run in the
> starkit.


I think it's again that the file name is passed to the OS and so the
file needs to be in a native file system (like the TEMP dir).

I think there was some talk about reading icons directly and just
passing the data to the OS, so this may change in some future version.


benny
C. Plater

2004-06-26, 8:56 am

Bob wrote:
> "C. Plater" <cplater@yahoo.com> wrote in message news:<f_SdnRyt8pqlREvdRVn-tw@comcast.com>...
>
>
>
> How do I use [file join [file dirname [info script] in conjunction
> with:
>
> set imgForward [image create photo -file forward_nav.gif]
>
> Which is how images for buttons are created? I am new and making the
> two work together has baffled me and so prevented me from packing my
> scripts into EXE's.
>
> Robert



set imgForward [image create photo -file [file join [file dirname [info
script]] forward_nav.gif]]

This assumes your "gif" file is in the same directory as the script. I
store my ".gif"s in a sub-directory that I include in the wrapped code
so I'll usually do this:

set imagesdir [file join [file dirname [info script]]]
set imgFordward [image create photo -file [file join $imagesdir
forward_nav.gif]]


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com