Re: starpack & starkit source tcl files
From: Jean-Claude Wippler (jcw_at_equi4.com)
Date: 02/17/04
- Next message: art morel: "Re: wm geom will return different values even though window is not resizable in y."
- Previous message: Bob Techentin: "Re: installation of tk8.3.3 on linux"
- In reply to: c. older: "starpack & starkit source tcl files"
- Next in thread: c. older: "Re: starpack & starkit source tcl files"
- Reply: c. older: "Re: starpack & starkit source tcl files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 Feb 2004 07:17:57 -0800
colder@myself.com (c. older) wrote...
> Am trying to create a starpack on linux-x86 but can't seem to get the
> files sourced properly. I have no problems on windows, but the tclkit
> is a few versions older.
Which one is it - why not update from http://www.equi4.com/pub/tk/ ?
> ---- in main.tcl -----
>
> package require starkit
> starkit::startup
> set env(BASEDIR) [file join $starkit::topdir]
> source [file join $env(BASEDIR) bin flshcopy.tcl]
Why not simply:
source [file join $starkit::topdir bin flshcopy.tcl]
[...]
> if {! [info exists env(BASEDIR)] } {
> set env(BASEDIR) [pwd]
> }
>
> set _src_files { ftp_procs.tcl scrnsprt.tcl flshutil.tcl }
>
> puts "\nenv(BASEDIR) : $env(BASEDIR)"
> puts "starkit::topdir : $starkit::topdir"
> puts "pwd : [pwd]"
> puts "auto_path : $auto_path\n"
> C.Older
> foreach _file $_src_files {
> set _file [file join $env(BASEDIR) bin $_file]
> source $_file
Why not simply:
source [file join $starkit::topdir bin $_file]
Your troubles seem to te caused by your assumption that "[pwd]"
returns a path which has anything to do with the location of your
scripts.
Not true. Create a script with "puts [pwd]" in it, go to a completely
different directory and then run that script, using its full path,
e.g. "tclsh /path/to/my/demo/script.tcl".
If you insist, try replacing all your [pwd]'s with "[file dirname
[info script]]" - although that too is not full proof when called from
inside proc's...
-jcw
- Next message: art morel: "Re: wm geom will return different values even though window is not resizable in y."
- Previous message: Bob Techentin: "Re: installation of tk8.3.3 on linux"
- In reply to: c. older: "starpack & starkit source tcl files"
- Next in thread: c. older: "Re: starpack & starkit source tcl files"
- Reply: c. older: "Re: starpack & starkit source tcl files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|